Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library is actually slower than scrypt-js with setImmediate polyfill #17

Open
desfero opened this issue Nov 6, 2023 · 0 comments
Open

Comments

@desfero
Copy link

desfero commented Nov 6, 2023

It appears the library is actually around 25% slower than scrypt-js when the polifill for setImmediate is provided (otherwise it fallbacks to setTimeout which is slower due to being run in the tasks queue not micro tasks queue).

Input: {"P":"pleaseletmein","S":"SodiumChloride","N":65536,"r":8,"p":1,"dkLen":64}
  scrypt-pbkdf — mean time: 626ms ±1.84% (9 runs sampled)
  scrypt-js — mean time: 485ms ±3.34% (9 runs sampled)
  scryptsy — mean time: 23649ms ±267.28% (8 runs sampled)

Input: {"P":"pleaseletmein","S":"SodiumChloride","N":131072,"r":8,"p":1,"dkLen":64}
  scrypt-pbkdf — mean time: 1292ms ±4.10% (7 runs sampled)
  scrypt-js — mean time: 946ms ±2.58% (9 runs sampled)
  scryptsy — mean time: 10943ms ±186.85% (6 runs sampled)

Input: {"P":"pleaseletmein","S":"SodiumChloride","N":262144,"r":8,"p":1,"dkLen":64}
  scrypt-pbkdf — mean time: 2529ms ±1.60% (6 runs sampled)
  scrypt-js — mean time: 1888ms ±1.64% (7 runs sampled)
  scryptsy — mean time: 5179ms ±0.14% (5 runs sampled)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant