-
Notifications
You must be signed in to change notification settings - Fork 103
Refactor and optimize two
#521
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
Conversation
|
So far, I'm seeing speedups of 2–4% on benchmarks for |
Just to be safe.
| -- | This function lives at the top-level so 'two' and `two'` can be inlined | ||
| -- without inlining this loop. | ||
| two_go :: ShiftedHash -> HashMap k v -> ShiftedHash -> HashMap k v -> ST s (HashMap k v) | ||
| two_go !sh1 t1 !sh2 t2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having this loop at the top-level nicely reduces the bloat, but functions like union seem to get slower by up to 4% :/
|
I've extracted the (in my mind) unquestionable changes to #524. I'll have another go at |
TODO:
ShiftedHashwith utilities likeshiftSH,maskSHetc