scrypt-jane icon indicating copy to clipboard operation
scrypt-jane copied to clipboard

Fix gettimeofday()-based get_ticks()

Open solardiz opened this issue 1 year ago • 1 comments

This actually implements the gettimeofday()-based get_ticks(), where the previous "implementation" looks like it was never even compile-tested. While it at, another commit here adds reporting of average tick counts (not only the minimum).

solardiz avatar Apr 30 '23 20:04 solardiz

FWIW, I just used these (along with some hacks not suitable for a pull request) for quick-n-dirty benchmarks at 16384,8,1 computing classic scrypt vs. same with yescrypt's scrypt compat mode on 2xE5-2670 8xDDR3-1600, both AVX builds, both with memory (de)allocation out of loop, no huge pages. In this test, yescrypt's code is 4% faster at 1 process, 7% faster at 32 concurrent processes. Note: this is not native yescrypt, this is classic scrypt computed by the code in yescrypt. So it's apples to apples. I don't know why exactly the speed difference, but it could be in part because scrypt-jane doesn't do prefetches whereas yescrypt does (including in scrypt mode).

I needed the real time ticks for easier comparison to my benchmark of the yescrypt code.

solardiz avatar Apr 30 '23 20:04 solardiz