-
-
Notifications
You must be signed in to change notification settings - Fork 55
change old (<=0.10) node detection #25
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
Conversation
LGTM. |
the current version will always work while the updated version will probably work, I can't see this as being much of a speed up considering the a single round of pbkdf2 is by definition a small fraction of the total run time of the eventual computation |
7b6f73c
to
e191f7e
Compare
Updated. |
so yes it will add a speed up to the first call, but a slowdown for every program that requires this module, previously the has was calculated only the first time pbkdf2 was called and then never calculated again. I'm not convinced that removing that one function call if statement is much of a speedup in the first place... |
Agree |
ok but your way of testing slows down the start up of every program that requires this module... |
I don't understand... $ cat a.js
require('./x')
require('./b')
$ cat b.js
require('./x')
$ cat x.js
var f = (function () {
console.log('h1')
return true
})()
module.exports = f ? 1 : 0
$ node a.js
h1 |
yes but it will be called even if somebody never uses pbkdf2 instead of the On Wed, Feb 24, 2016 at 12:22 PM Kirill Fomichev notifications@github.com
|
Oh, I see it now. Thanks @calvinmetcalf for explanation! I see two options:
|
yes you got it, I believe I originally used process.version, but when iojs happened the tests broke which is why I'm somewhat distrustful of the process.version testing |
this was merged as part of #27 |
Not sure that you will agree with export changes, but I ready remove this.