diff options
author | Daniel Schadt <kingdread@gmx.de> | 2025-04-15 22:29:06 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2025-04-15 22:30:40 +0200 |
commit | 5e05745e93a126673f2ba96d1746637fe0a3f52d (patch) | |
tree | 56c78314ca63ca875bfbd5326116a4ff382de7a8 /benches | |
parent | 9b6cdde3509aa269b77698283f8080c587d4d1dc (diff) | |
download | zears-5e05745e93a126673f2ba96d1746637fe0a3f52d.tar.gz zears-5e05745e93a126673f2ba96d1746637fe0a3f52d.tar.bz2 zears-5e05745e93a126673f2ba96d1746637fe0a3f52d.zip |
slightly speed up aez_prf
It doesn't matter much because we barely expect tau > 16, but if
somebody decides to use aez as a way to generate a lot of pseudorandom
bytes, then oh well.
With this change, we make better use of SIMD block xor'ing if available.
Diffstat (limited to 'benches')
-rw-r--r-- | benches/zears.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/benches/zears.rs b/benches/zears.rs index 8ea78ba..1144087 100644 --- a/benches/zears.rs +++ b/benches/zears.rs @@ -23,6 +23,11 @@ fn bench(c: &mut Criterion) { b.iter(|| aez.encrypt_inplace(&[0], &[], 16, &mut out)) }); + group.bench_function(BenchmarkId::new("aez_prf", size), |b| { + let mut out = vec![0u8; size]; + b.iter(|| aez.encrypt_inplace(&[0], &[], size as u32, &mut out)) + }); + let buf = aez.encrypt(&[0], &[], 16, &buf); group.bench_function(BenchmarkId::new("decrypt", size), |b| { |