You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got an algorithm implementation I thought I should speed up by replacing FnvHashSet with AHashSet.
But the benchmark resulted in a +15% regression after the change:/
Is this to be expected? Could the problem be that I'm testing on a M1 Arm?
With AHashSet M1 (with +nightly-2021-05-10-aarch64-apple-darwin):
intersection_bench time: [38.696 ms 38.713 ms 38.730 ms]
change: [+15.275% +15.336% +15.395%] (p = 0.00 < 0.05)
Performance has regressed.
With FnvHashSet M1 (with +nightly-2021-05-10-aarch64-apple-darwin):
intersection_bench time: [33.544 ms 33.556 ms 33.571 ms]
change: [-13.369% -13.319% -13.269%] (p = 0.00 < 0.05)
Performance has improved.
I've got public snapshots if anyone wants to play along at home.
Edit:
Same test with x86_64 gives AHashSet a 2% advantage over FnvHashSet, but that's on a tired, heat-throttling laptop. So it's hard to draw any conclusions on those samples.
For good measure I ran the bench test in M1 again, and this time AHashSet repeatably wins by 10%, I'm utterly confused.
Update: Turns out the culprit was a rustup update that ran this morning. The numbers above was generated with an older compiler. With a fresh compiler I get these numbers:
With AHashSet M1 nightly-2021-05-30-aarch64-apple-darwin
intersection_bench time: [33.283 ms 33.298 ms 33.316 ms]
change: [-11.281% -11.221% -11.157%] (p = 0.00 < 0.05)
Performance has improved.
With FnvHashSet M1 (with +nightly-2021-05-30-aarch64-apple-darwin):
intersection_bench time: [37.606 ms 37.629 ms 37.655 ms]
change: [+12.910% +13.006% +13.102%] (p = 0.00 < 0.05)
Performance has regressed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've got an algorithm implementation I thought I should speed up by replacing FnvHashSet with AHashSet.
But the benchmark resulted in a +15% regression after the change:/
Is this to be expected? Could the problem be that I'm testing on a M1 Arm?
With AHashSet M1 (with +nightly-2021-05-10-aarch64-apple-darwin):
With FnvHashSet M1 (with +nightly-2021-05-10-aarch64-apple-darwin):
I've got public snapshots if anyone wants to play along at home.
Edit:
Same test with x86_64 gives AHashSet a 2% advantage over FnvHashSet, but that's on a tired, heat-throttling laptop. So it's hard to draw any conclusions on those samples.
For good measure I ran the bench test in M1 again, and this time AHashSet repeatably wins by 10%, I'm utterly confused.
Update: Turns out the culprit was a
rustup update
that ran this morning. The numbers above was generated with an older compiler. With a fresh compiler I get these numbers:With AHashSet M1 nightly-2021-05-30-aarch64-apple-darwin
With FnvHashSet M1 (with +nightly-2021-05-30-aarch64-apple-darwin):
I quess we can close this Q now.
Beta Was this translation helpful? Give feedback.
All reactions