<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hello,</div><div class=""><br class=""></div><div class="">dict is not a fastest data structure structure, ets out performs it by level of magnitude.</div><div class="">if you have an issue with "ets performanceā€¯ then you are doing something wrong. </div><div class="">Personally, I prefer to use gb_trees, rbtree or binary-search tree instead of dict. </div><div class=""><br class=""></div><div class="">Could you share your test data set for kmean? </div><div class="">We can look deeply where the issue is.</div><div class=""><br class=""></div><div class="">Best Regards, </div><div class="">Dmitry</div><br class=""><div><blockquote type="cite" class=""><div class="">On 24 Feb 2015, at 10:40, Andrea Peruffo <<a href="mailto:andrea.peruffo1982@gmail.com" class="">andrea.peruffo1982@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class="">This:<br class=""><a href="https://github.com/andreaferretti/kmeans" class="">https://github.com/andreaferretti/kmeans</a><br class=""></div>is a benchmark of different languages on a kmeans clustering algo.<br class=""><br class=""></div>I made an implementation of it but is terribly slow...<br class=""><br class=""></div>A question is about the data structure "dict" I used, is that the proper use case or there is anything better?<br class=""></div>I have checked with "ets" but looks even slower...<br class=""></div><br class=""></div>Is there anything wrong with the provided implementation?<br class=""><br class=""></div>Thanks in advance.<br class=""><div class=""><div class=""><br class=""><div class=""><div class=""><div class=""><br class=""></div></div></div></div></div></div>
_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></body></html>