Skip to content

Improve performance of hashing SmallBitVecs#27

Merged
mbrubeck merged 2 commits intoservo:masterfrom
narpfel:improve-hash-performance
Aug 5, 2021
Merged

Improve performance of hashing SmallBitVecs#27
mbrubeck merged 2 commits intoservo:masterfrom
narpfel:improve-hash-performance

Conversation

@narpfel
Copy link
Contributor

@narpfel narpfel commented Aug 4, 2021

Hash one word at a time instead of one bit at a time.

Performance measurements:

Before:

small                   time:   [362.51 ns 363.83 ns 365.24 ns]
large                   time:   [89.993 us 90.255 us 90.548 us]

After:

small                   time:   [23.911 ns 23.976 ns 24.047 ns]
                        change: [-93.407% -93.378% -93.346%] (p = 0.00 < 0.05)
large                   time:   [639.93 ns 642.11 ns 644.49 ns]
                        change: [-99.298% -99.293% -99.289%] (p = 0.00 < 0.05)

@mbrubeck
Copy link
Collaborator

mbrubeck commented Aug 5, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants