From 95da6b5f4a04e694cf7a15a1c399cfba5fa66205 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Wed, 4 Sep 2024 09:42:08 -0700 Subject: [PATCH] add xof benchmarks for non-power-of-2 lengths --- benches/bench.rs | 57 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/benches/bench.rs b/benches/bench.rs index 4169ea792..3c32e5188 100644 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -526,7 +526,7 @@ fn bench_xof(b: &mut Bencher, len: usize) { #[bench] fn bench_xof_01_block(b: &mut Bencher) { - bench_xof(b, BLOCK_LEN); + bench_xof(b, 1 * BLOCK_LEN); } #[bench] @@ -534,16 +534,71 @@ fn bench_xof_02_blocks(b: &mut Bencher) { bench_xof(b, 2 * BLOCK_LEN); } +#[bench] +fn bench_xof_03_blocks(b: &mut Bencher) { + bench_xof(b, 3 * BLOCK_LEN); +} + #[bench] fn bench_xof_04_blocks(b: &mut Bencher) { bench_xof(b, 4 * BLOCK_LEN); } +#[bench] +fn bench_xof_05_blocks(b: &mut Bencher) { + bench_xof(b, 5 * BLOCK_LEN); +} + +#[bench] +fn bench_xof_06_blocks(b: &mut Bencher) { + bench_xof(b, 6 * BLOCK_LEN); +} + +#[bench] +fn bench_xof_07_blocks(b: &mut Bencher) { + bench_xof(b, 7 * BLOCK_LEN); +} + #[bench] fn bench_xof_08_blocks(b: &mut Bencher) { bench_xof(b, 8 * BLOCK_LEN); } +#[bench] +fn bench_xof_09_blocks(b: &mut Bencher) { + bench_xof(b, 9 * BLOCK_LEN); +} + +#[bench] +fn bench_xof_10_blocks(b: &mut Bencher) { + bench_xof(b, 10 * BLOCK_LEN); +} + +#[bench] +fn bench_xof_11_blocks(b: &mut Bencher) { + bench_xof(b, 11 * BLOCK_LEN); +} + +#[bench] +fn bench_xof_12_blocks(b: &mut Bencher) { + bench_xof(b, 12 * BLOCK_LEN); +} + +#[bench] +fn bench_xof_13_blocks(b: &mut Bencher) { + bench_xof(b, 13 * BLOCK_LEN); +} + +#[bench] +fn bench_xof_14_blocks(b: &mut Bencher) { + bench_xof(b, 14 * BLOCK_LEN); +} + +#[bench] +fn bench_xof_15_blocks(b: &mut Bencher) { + bench_xof(b, 15 * BLOCK_LEN); +} + #[bench] fn bench_xof_16_blocks(b: &mut Bencher) { bench_xof(b, 16 * BLOCK_LEN);