Skip to content

Commit

Permalink
Add blake3 to the benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed May 11, 2024
1 parent 91caf6c commit 41f72dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ascon-aead = "0.4.2"
aes-gcm = "0.10.3"
chacha20poly1305 = "0.10.1"
sthash = "0.2.15"
blake3 = "1.5.1"

[target."cfg(not(any(target_arch = \"wasm32\", target_arch = \"wasm64\")))".dev-dependencies.boring]
version = "4.6.0"
Expand Down
4 changes: 4 additions & 0 deletions benches/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ fn main() {
let res = bench.run(options, || sthash.hash(&m));
println!("sthash : {}", res.throughput(m.len() as _));

let b3 = blake3::Hasher::new_keyed(&[0u8; 32]);
let res = bench.run(options, || b3.clone().update(&m).finalize());
println!("blake3 : {}", res.throughput(m.len() as _));

println!();
}

Expand Down

0 comments on commit 41f72dd

Please sign in to comment.