diff --git a/Cargo.lock b/Cargo.lock index 7973c05..0fd1f35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -158,16 +158,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "criterion-cycles-per-byte" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f82e634fea1e2312dc41e6c0ca7444c5d6e7a1ccf3cf4b8de559831c3dcc271" -dependencies = [ - "cfg-if", - "criterion", -] - [[package]] name = "criterion-plot" version = "0.6.0" @@ -402,7 +392,6 @@ dependencies = [ "cpubits", "cpufeatures", "criterion", - "criterion-cycles-per-byte", "hex-literal", "proptest", "universal-hash", diff --git a/polyval/Cargo.toml b/polyval/Cargo.toml index b3e2c40..f30c472 100644 --- a/polyval/Cargo.toml +++ b/polyval/Cargo.toml @@ -32,8 +32,6 @@ hex-literal = "1" [target.'cfg(any(unix, windows))'.dev-dependencies] criterion = "0.7" proptest = "1.9" -[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies] -criterion-cycles-per-byte = "0.7" [[bench]] name = "polyval" diff --git a/polyval/benches/polyval.rs b/polyval/benches/polyval.rs index 65e41df..5664aab 100644 --- a/polyval/benches/polyval.rs +++ b/polyval/benches/polyval.rs @@ -5,12 +5,7 @@ use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main}; use polyval::{Polyval, universal_hash::UniversalHash}; -#[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))] -type Benchmarker = Criterion; -#[cfg(any(target_arch = "x86_64", target_arch = "x86"))] -type Benchmarker = Criterion; - -fn bench(c: &mut Benchmarker) { +fn bench(c: &mut Criterion) { let mut group = c.benchmark_group("polyval"); for size in &[10, 100, 1000, 10000] { @@ -27,18 +22,10 @@ fn bench(c: &mut Benchmarker) { group.finish(); } -#[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))] criterion_group!( name = benches; config = Criterion::default(); targets = bench ); -#[cfg(any(target_arch = "x86_64", target_arch = "x86"))] -criterion_group!( - name = benches; - config = Criterion::default().with_measurement(criterion_cycles_per_byte::CyclesPerByte); - targets = bench -); - criterion_main!(benches);