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 <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2022-10-18 19:27:56 +01:00
parent 786d285987
commit cb1733d6ad
1 changed files with 3 additions and 3 deletions

View File

@ -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());