-
Notifications
You must be signed in to change notification settings - Fork 99
Unordered-containers slower than hashmap for simple ordered insert #123
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
Comments
CC @augustss |
I don't have time to look at this just now, but I know that u-c is somewhat slower on pure inserts compared to IntMap (there's more memory allocated as the tree is fatter). There are some memory optimizations to be done (there's a recent OPSLA paper about it), but nothing I have time for now. |
@tibbe What's that OPSLA paper? |
@sjakobi maybe it was https://2015.splashcon.org/details/splash2015-artifacts/3/Optimizing-Hash-Array-Mapped-Tries-for-Fast-and-Lean-Immutable-JVM-Collections. I no longer remember. |
#387 may help to speed up insertions. |
Given:
I get the output:
Namely, unordered-containers is 3x slower. I believe this, but with a smaller number in the list, is why Shake is faster on hashmap, as per ndmitchell/shake#418. I submit this separately from #119 because there are no collisions and all keys are packed to the lower bits, so it should avoid all the nasty behaviours in #119, but then still goes slower.
The results persist if I swap the order of the tests, so it does not seem to be GC based. Windows 32bit, GHC 7.10.2, hashmap-1.3.0.1, unordered-containers-0.2.7.0.
The text was updated successfully, but these errors were encountered: