Skip to content

Highly variable performance #8

Description

@dcousens
let scrypt = require('scryptsy')
let passphrase = Buffer.from('54657374696e674f6e6554776f5468726565', 'hex')
let salt = Buffer.from('e957a24a', 'hex')

function time (f) {
  let t0 = new Date().getTime()
  f()
  console.log((new Date().getTime() - t0) + ' ms')
}

time(() => scrypt(passphrase, salt, 16384, 8, 8, 64))
time(() => scrypt(passphrase, salt, 16384, 8, 8, 64))
3058 ms
16034 ms

Results are consistently 5x on the second call.
Related bitcoinjs/bip38#40 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions