[erlang-questions] Why so slow kmeans implementation

Dmitry Kolesnikov dmkolesnikov@REDACTED
Tue Feb 24 10:52:05 CET 2015


Hello,

dict is not a fastest data structure structure, ets out performs it by level of magnitude.
if you have an issue with "ets performance” then you are doing something wrong.  
Personally, I prefer to use gb_trees, rbtree or binary-search tree instead of dict. 

Could you share your test data set for kmean? 
We can look deeply where the issue is.

Best Regards, 
Dmitry

> On 24 Feb 2015, at 10:40, Andrea Peruffo <andrea.peruffo1982@REDACTED> wrote:
> 
> This:
> https://github.com/andreaferretti/kmeans <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...
> 
> Is there anything wrong with the provided implementation?
> 
> Thanks in advance.
> 
> 
> _______________________________________________
> 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/130872bf/attachment.htm>


More information about the erlang-questions mailing list