Skip to content
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

Customize hashing for hot maps #618

Merged
merged 2 commits into from
Aug 21, 2023
Merged

Customize hashing for hot maps #618

merged 2 commits into from
Aug 21, 2023

Conversation

udoprog
Copy link
Collaborator

@udoprog udoprog commented Aug 21, 2023

With this we're seeing a 5-10% speedup compared to the default hash used for hash maps:

aoc_2020_1a             time:   [214.55 µs 215.35 µs 216.22 µs]
                        change: [-6.7605% -6.2809% -5.8364%] (p = 0.00 < 0.05)
                        Performance has improved.
aoc_2020_1b             time:   [757.62 µs 759.64 µs 762.21 µs]
                        change: [-12.110% -11.672% -11.268%] (p = 0.00 < 0.05)
                        Performance has improved.
aoc_2020_11a            time:   [315.06 ms 315.79 ms 316.59 ms]
                        change: [-5.5867% -5.2768% -4.9616%] (p = 0.00 < 0.05)
                        Performance has improved.
aoc_2020_19b            time:   [219.67 ms 220.34 ms 221.07 ms]
                        change: [-6.2175% -5.8469% -5.4795%] (p = 0.00 < 0.05)
                        Performance has improved.
brainfuck_hello_world   time:   [843.70 µs 845.93 µs 848.87 µs]
                        change: [-7.5888% -6.8126% -6.0949%] (p = 0.00 < 0.05)
                        Performance has improved.
brainfuck_hello_world2  time:   [8.9777 ms 8.9983 ms 9.0236 ms]
                        change: [-7.3782% -6.9379% -6.5155%] (p = 0.00 < 0.05)
                        Performance has improved.
brainfuck_fib           time:   [47.993 ms 48.117 ms 48.275 ms]
                        change: [-10.628% -9.6902% -8.7642%] (p = 0.00 < 0.05)
                        Performance has improved.
brainfuck_loopity       time:   [7.7490 ms 7.7620 ms 7.7760 ms]
                        change: [-6.7243% -6.3566% -6.0391%] (p = 0.00 < 0.05)
                        Performance has improved.
fib_15                  time:   [346.42 µs 346.97 µs 347.93 µs]
                        change: [-5.5870% -4.9540% -4.3864%] (p = 0.00 < 0.05)
                        Performance has improved.
fib_20                  time:   [3.8800 ms 3.8835 ms 3.8873 ms]
                        change: [-5.3582% -5.2084% -5.0557%] (p = 0.00 < 0.05)
                        Performance has improved.
external_functions      time:   [570.02 ns 570.28 ns 570.60 ns]
                        change: [-3.6023% -3.1358% -2.6129%] (p = 0.00 < 0.05)
                        Performance has improved.

@udoprog udoprog added the enhancement New feature or request label Aug 21, 2023
@udoprog udoprog merged commit b8fd316 into main Aug 21, 2023
@udoprog udoprog deleted the fast-map-hashing branch August 21, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant