yescrypt
yescrypt copied to clipboard
Improve accuracy of benchmarks
Several things need to be done in order to improve the accuracy of benchmarks:
- Unroll the loops. Force iteration counts to be a power of two, and each implementation should unroll the loop by dividing by some power of 2 as it sees fit.
- Randomize / change the passphrase. There may be cache effects resulting from using the same passphrase/salt over and over again. Each computation should use a different passphrase. It's probably enough to use a simple counter (since it's input to PBKDF2, the result is random anyway).