On Wednesday, 1 October 2014 at 21:40:01 UTC, Ali Çehreli wrote:
Are you motivated enough to compare D's associative arrays with
those results? :)
Here's another benchmark:
D AAs vs. Vibe.d's open addressing hashes vs. Robin Hood hashing:
http://www.infognition.com/blog/2014/on_robin_hood_hashing.html
There's a link to a table with timings, meaning of which
described in the post.
Also compared a bit with C++'s CAtlMap<int, int> in MSVC 10 which
I was told was pretty good. Generated 10 million random ints from
range of 1 million, made a histogram and then read it. Exactly
same data for both implementations (CAtlMap and Robin Hood in D).
With default settings CAtlMap makes histo in 2.19 sec, reads it
in 1.19 sec. Robin Hood in D makes same histo in 1.27 sec, reads
in 1.09 sec (and it's DMD 32-bit!).
After adding Rehash() between making and reading the histogram,
CAtlMap makes histo in 2.37 sec, reads in 0.92.