-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
[perf] Change stable hasher to Blake3 #127754
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[perf] Change stable hasher to Blake3 Based on rust-lang/rustc-stable-hash@main...Urgau:rustc-stable-hash:blake3 cc `@michaelwoerister` r? ghost
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
@bors try |
[perf] Change stable hasher to Blake3 Based on rust-lang/rustc-stable-hash@main...Urgau:rustc-stable-hash:blake3 cc `@michaelwoerister` r? ghost
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
I have no idea about what's happening. stage1 and stage2 seems fine, but directly after Bolt-ing LLVM we
|
Is it possible that the Blake3 crate uses some low-level feature that BOLT does not support? |
It's quite possible, they have some hand-rolled assembly and some C code, which we are probably using due to the auto-detection in their Let's try without BOLT for now. The benchmarks won't be accurate, maybe +10% overall, but at least will know if the benchmarks go up way too much. @bors try |
[perf] Change stable hasher to Blake3 Based on rust-lang/rustc-stable-hash@main...Urgau:rustc-stable-hash:blake3 cc `@michaelwoerister` r? ghost
The job Click to see the possible cause of the failure (guessed by this bot)
|
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (6f5329c): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 5.0%, secondary 8.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 20.1%, secondary 19.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (primary -0.0%, secondary -0.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 700.525s -> 738.599s (5.44%) |
We are seeing regressions up to 122% for secondary benchmarks and up to 62% in primary benchmarks with a mean 26.2% regressions. Looking at the BOLT-ing of LLVM alone (2 years ago) it didn't even have a impact on instructions directly, granted many things have changed; and while BOLT-ing Those regressions seems to indicate that Blake 3 is not a suitable replacement for our SipHasher for stable hashing of small structs. It might perform much better with bigger inputs (like files), at least that's what is being suggested with their own benchmarks showing a 16Kib input. In general it seems like Blake 3 is throughput-optimized, while for stable hashing, latency is the most important. It even has a 1024-bit fixed-input buffer, which probably explains why max-rss was so dearly affected. |
To have more up to date results than 2 years ago, as bolt has also evolved since then, you could also do a perf run with only the commit disabling it. |
Based on the results above and this article, I'm trying Blake2s in #127809. |
Given the results above (even taking a considerable BOLT margin), Blake3 is probably a dead-end for our use-case. Closing. |
[perf] Change stable hasher to Blake2s Based on rust-lang/rustc-stable-hash@main...Urgau:rustc-stable-hash:blake2 With inputs from https://jszym.com/blog/short_input_hash/ and rust-lang#127754. cc `@michaelwoerister` `@Kobzol` r? ghost
[perf] Change stable hasher to Blake2s Based on rust-lang/rustc-stable-hash@main...Urgau:rustc-stable-hash:blake2 With inputs from https://jszym.com/blog/short_input_hash/ and rust-lang#127754. cc `@michaelwoerister` `@Kobzol` r? ghost
Based on rust-lang/rustc-stable-hash@main...Urgau:rustc-stable-hash:blake3
cc @michaelwoerister
r? ghost