-
-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better Hashmap tests #82
Comments
these results are a bit old @data-man . |
You can always generate new results. :) |
@wangyi-fudan just FYI Martin Ankerl in the link above compared emhash and commented it like this:
|
I'm more leaning to https://github.com/greg7mdp/parallel-hashmap, I'm not so sure our tested hashfuncs are actually inlined with the current HashMapTest. Definitely need to be templated with new pfhash classes, and not via std:function indirect calls. |
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
to help inlining the hash function. See #82
I think it would be nice to disable quadratic probing as well. |
Yes. The idea was to test it with the common default hashtable, and a good modern one. Adding a trivial linear probing or even a chained one is a good idea, because so many people are still using them. |
Some would even say that if you have a good enough hash function, quadratic probing and tree-fallbacks only slow you down 😉 |
Others like me would argue that only the poor hash functions lead to acceptable hash table speed. Good hashes are for the weak. But it depends entirely on the usecase and the hash table impl. |
Originally I also checked various other much faster linear probing hashmaps, such as e.g. from rigtorp or the two swisstable variants (Google and Facebook), but I settled with the slow standard (seperate chaining) for fair comparison purposes.
Maybe add other ones, and document them.
@dumblob Speaking about currently worldwide available hashmaps, definitely skim the comparison from Martin Ankerl https://martin.ankerl.com/2019/04/01/hashmap-benchmarks-05-conclusion/ to notice one very important thing. Namely that some hashmaps are almost not at all sensitive to collisions and throughput and latency (Throughput versus latency) of the hash function, but other hashmaps rely completely on the quality and throughput and/or latency of the hash function.
To be fair in showing real use case scenarios, we would actually need to test one representative from the sensitive corner and one from the insensitive corner.
@rurban True. There should be a fast, sensitive linear probing also, besides the usual insensitive std chaining. About a robin_hood I'm not sure. It's much more stable than linear probing, and from outside just a fast chaining variant.
we need to add the stddev to the mean cycles. I'll also add the initial insert/delete timings, but without trials and outlier removal.
For poor hash functions add better security measures, like collision counting or tree-conversion.
None of the usual hashmaps are secure, so maybe add fixed versions and test the overhead.
The goal should be to choose a good hash function, small (inlinable!) and not too many collisions, based on the timings, for slow <unordered_map> and fast hash tables. With string keys, not numbers.
Parts taken from the discussions at #80 and #61
The text was updated successfully, but these errors were encountered: