diff --git a/sha1-checked/benches/mod.rs b/sha1-checked/benches/mod.rs index e5d64170e..feeb366d7 100644 --- a/sha1-checked/benches/mod.rs +++ b/sha1-checked/benches/mod.rs @@ -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!( @@ -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; ); diff --git a/sha1/benches/mod.rs b/sha1/benches/mod.rs index e5d64170e..5c52e954c 100644 --- a/sha1/benches/mod.rs +++ b/sha1/benches/mod.rs @@ -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; -);