-
Notifications
You must be signed in to change notification settings - Fork 100
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
Make use of shrinkSmallMutableArray#
primop
#362
Comments
Ooh, good thinking! |
We may be able to use it wherever we're currently using unordered-containers/Data/HashMap/Internal/Array.hs Lines 295 to 298 in d4e31f6
|
#406 has introduced unordered-containers/Data/HashMap/Internal/Array.hs Lines 210 to 222 in d24cc1f
So far it's only used in |
This results in a ~8% speedup in the filterWithKey benchmark. Context: #362
This results in a ~8% speedup in the filterWithKey benchmark. Context: #362
This results in a ~8% speedup in the filterWithKey benchmark. Context: #362
For reference: some performance aspects of |
Since GHC 8.10 there is a
shrinkSmallMutableArray#
primop that may be useful for functions likefilter
andmapMaybe
. It would allow us to perform deletions in-place instead of creating a new array.The text was updated successfully, but these errors were encountered: