Skip to content

Commit

Permalink
Apply formatting suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
onethumb committed Sep 7, 2024
1 parent df62cbe commit 9f3f0d2
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions benches/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,19 @@ fn bench_crc(c: &mut Criterion) {
digest.finalize()
})
});
group.bench_with_input(BenchmarkId::new("crc64fast_nvme::simd", size), &buf, |b, buf| {
b.iter(|| {
let mut digest = crc64fast_nvme::Digest::new();
digest.write(&buf[..(1 << size)]);
digest.write(&buf[(1 << size)..(2 << size)]);
digest.write(&buf[(2 << size)..]);
digest.sum64()
})
});
group.bench_with_input(
BenchmarkId::new("crc64fast_nvme::simd", size),
&buf,
|b, buf| {
b.iter(|| {
let mut digest = crc64fast_nvme::Digest::new();
digest.write(&buf[..(1 << size)]);
digest.write(&buf[(1 << size)..(2 << size)]);
digest.write(&buf[(2 << size)..]);
digest.sum64()
})
},
);
group.bench_with_input(
BenchmarkId::new("crc64fast_nvme::table", size),
&buf,
Expand Down

0 comments on commit 9f3f0d2

Please sign in to comment.