Skip to content

Commit

Permalink
update benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Mar 4, 2024
1 parent cfc746d commit 6c1ec45
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 45 deletions.
34 changes: 16 additions & 18 deletions sha1-checked/benches/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ extern crate test;

use digest::bench_update;
use sha1::Sha1;
use sha1_checked::Sha1 as Sha1Checked;
use test::Bencher;

bench_update!(
Expand All @@ -13,29 +14,26 @@ bench_update!(
sha1_10000 10000;
);

#[cfg(feature = "collision")]
bench_update!(
sha1::checked::Sha1::default();
sha1_collision_10 10;
sha1_collision_100 100;
sha1_collision_1000 1000;
sha1_collision_10000 10000;
Sha1Checked::default();
sha1_checked_10 10;
sha1_checked_100 100;
sha1_checked_1000 1000;
sha1_checked_10000 10000;
);

#[cfg(feature = "collision")]
bench_update!(
sha1::checked::Sha1::builder().detect_collision(false).build();
sha1_collision_no_check_10 10;
sha1_collision_no_check_100 100;
sha1_collision_no_check_1000 1000;
sha1_collision_no_check_10000 10000;
Sha1Checked::builder().detect_collision(false).build();
sha1_checked_no_check_10 10;
sha1_checked_no_check_100 100;
sha1_checked_no_check_1000 1000;
sha1_checked_no_check_10000 10000;
);

#[cfg(feature = "collision")]
bench_update!(
sha1::checked::Sha1::builder().use_ubc(false).build();
sha1_collision_no_ubc_10 10;
sha1_collision_no_ubc_100 100;
sha1_collision_no_ubc_1000 1000;
sha1_collision_no_ubc_10000 10000;
Sha1Checked::builder().use_ubc(false).build();
sha1_checked_no_ubc_10 10;
sha1_checked_no_ubc_100 100;
sha1_checked_no_ubc_1000 1000;
sha1_checked_no_ubc_10000 10000;
);
27 changes: 0 additions & 27 deletions sha1/benches/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,3 @@ bench_update!(
sha1_1000 1000;
sha1_10000 10000;
);

#[cfg(feature = "collision")]
bench_update!(
sha1::checked::Sha1::default();
sha1_collision_10 10;
sha1_collision_100 100;
sha1_collision_1000 1000;
sha1_collision_10000 10000;
);

#[cfg(feature = "collision")]
bench_update!(
sha1::checked::Sha1::builder().detect_collision(false).build();
sha1_collision_no_check_10 10;
sha1_collision_no_check_100 100;
sha1_collision_no_check_1000 1000;
sha1_collision_no_check_10000 10000;
);

#[cfg(feature = "collision")]
bench_update!(
sha1::checked::Sha1::builder().use_ubc(false).build();
sha1_collision_no_ubc_10 10;
sha1_collision_no_ubc_100 100;
sha1_collision_no_ubc_1000 1000;
sha1_collision_no_ubc_10000 10000;
);

0 comments on commit 6c1ec45

Please sign in to comment.