[erlang-questions] Why so slow kmeans implementation

Hynek Vychodil vychodil.hynek@REDACTED
Tue Feb 24 15:04:48 CET 2015


I second that.

BTW the process dictionary version is 50 times faster on mine computer.

https://github.com/andreaferretti/kmeans/pull/13

Anyway I would definitely not use Erlang for this sort of task in the
production. I would write NIF or use port or C-node for this sort of task.

On Tue, Feb 24, 2015 at 11:36 AM, Loïc Hoguin <essen@REDACTED> wrote:

> On 02/24/2015 10:53 AM, Björn Gustavsson wrote:
>
>> On Tue, Feb 24, 2015 at 9:40 AM, Andrea Peruffo
>> <andrea.peruffo1982@REDACTED> wrote:
>>
>>> This:
>>> https://github.com/andreaferretti/kmeans
>>> is a benchmark of different languages on a kmeans clustering algo.
>>>
>>> I made an implementation of it but is terribly slow...
>>>
>>> A question is about the data structure "dict" I used, is that the proper
>>> use
>>> case or there is anything better?
>>> I have checked with "ets" but looks even slower...
>>>
>>>
>> Using sofs was 10 times faster on my computer:
>>
>
> If only a kind soul could improve the sofs documentation so it is
> understandable by lesser human beings... :-)
>
> --
> Loïc Hoguin
> http://ninenines.eu
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150224/d0a39a63/attachment.htm>


More information about the erlang-questions mailing list