-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Switch to the blake2b_simd
crate in sp-core-hashing
#13548
Switch to the blake2b_simd
crate in sp-core-hashing
#13548
Conversation
bot bench $ pallet dev frame_benchmarking There was also the idea for Blake3 #12785 |
@ggwpez https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2490171 was started for your command Comment |
@ggwpez Command |
Looks like the weight benchmarks also see a minor improvement/stay mostly the same (21.9us -> 21.4us). Those benches only hash 4 bytes though, so we can't expect miracles. @ggwpez Maybe we should add a few more benches there which try to hash more data? |
You can add some more, but in most cases we only hash AccountIDs so the 4 byte is a good baseline. |
bot merge |
bump sc-sysinfo/sp-core/sp-core-hashing - https://diff.rs/sp-core-hashing/8.0.0/7.0.0/Cargo.toml - paritytech/substrate#13548
…3548) * Switch to the `blake2b_simd` crate in `sp-core-hashing` * ".git/.scripts/commands/bench/bench.sh" pallet dev frame_benchmarking --------- Co-authored-by: command-bot <>
…3548) * Switch to the `blake2b_simd` crate in `sp-core-hashing` * ".git/.scripts/commands/bench/bench.sh" pallet dev frame_benchmarking --------- Co-authored-by: command-bot <>
It looks like switching from the
blake2
crate toblake2b_simd
speeds up BLAKE2 hashing by at least ~20%.I also checked whether enabling the
simd
feature on the originalblake2
crate helps, and that made the benchmarks slower.