From cb1733d6adfe74e163b6a29410e16a0d649b74ad Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Tue, 18 Oct 2022 19:27:56 +0100 Subject: [PATCH] Change number of iterations for the compact-note-decryption benchmark to 10240. This improves the accuracy by ensuring a more even distribution of more expensive decryptions. Signed-off-by: Daira Hopwood --- benches/note_decryption.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/benches/note_decryption.rs b/benches/note_decryption.rs index 5385e4eb..3ebbc6ed 100644 --- a/benches/note_decryption.rs +++ b/benches/note_decryption.rs @@ -32,10 +32,10 @@ fn bench_note_decryption(c: &mut Criterion) { // // Our fixed (action, invalid ivk) tuple will always fall into a specific rejection // case. In order to reflect the real behaviour in the benchmarks, we trial-decrypt - // with 1000 invalid ivks (each of which will result in a different uniformly-random - // plaintext); this is equivalent to trial-decrypting 1000 different actions with the + // with 10240 invalid ivks (each of which will result in a different uniformly-random + // plaintext); this is equivalent to trial-decrypting 10240 different actions with the // same ivk, but is faster to set up. - let invalid_ivks: Vec<_> = (0u32..1000) + let invalid_ivks: Vec<_> = (0u32..10240) .map(|i| { let mut sk = [0; 32]; sk[..4].copy_from_slice(&i.to_le_bytes());