summaryrefslogtreecommitdiffstats
path: root/benches/bigfile.rs
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2025-06-25 08:40:24 +0000
committerSanto Cariotti <santo@dcariotti.me>2025-06-25 08:40:24 +0000
commit2ef7371f7a4eefe7478cad43cb4922efaa12876a (patch)
tree44b58583caa1ea663f75c3c6c0fcdb7b265a6f88 /benches/bigfile.rs
parentc402255ea5ef6510a583b79e49f4246dc618c362 (diff)
Use `rayon` for parallelization
Diffstat (limited to 'benches/bigfile.rs')
-rw-r--r--benches/bigfile.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/benches/bigfile.rs b/benches/bigfile.rs
index 3d2088d..f9752a1 100644
--- a/benches/bigfile.rs
+++ b/benches/bigfile.rs
@@ -46,7 +46,10 @@ fn cleanup_files(filenames: &Vec<String>) -> std::io::Result<()> {
Ok(())
}
-fn test_merkle_tree<H: Hasher + Clone + 'static>(hasher: H, files: &Vec<Vec<u8>>) {
+fn test_merkle_tree<H: Hasher + Clone + 'static + std::marker::Sync>(
+ hasher: H,
+ files: &Vec<Vec<u8>>,
+) {
let tree = MerkleTree::new(hasher.clone(), files);
let proofer = DefaultProofer::new(hasher, tree.leaves().clone());
let root = tree.root();
@@ -118,7 +121,7 @@ fn bench_large_merkle_tree_blake3(c: &mut Criterion) {
group.sample_size(10);
for size in [5, 10, 15] {
group.bench_function(
- format!("MerkleTree creation and validation with 10 nodes and Keccak256 algorithm. {size} MB per each file."),
+ format!("MerkleTree creation and validation with 10 nodes and Blake3 algorithm. {size} MB per each file."),
|b| {
let files = setup_files(&filenames, size).expect("failed to allocate new files");