Uh oh!
There was an error while loading. Please reload this page.
lib: fix expensive isNaN call in readable streams - #1925
Conversation
Replace a call to `isNaN(n)` with `n !== n`. Removes most of the overhead from the following hotspot: 13.59% iojs perf-603.map [.] LazyCompile:*isNaN native v8natives.js:67
trevnorris
commented
Jun 9, 2015
LGTM |
brendanashworth
commented
Jun 9, 2015
ref: #936 |
Fishrock123
commented
Jun 9, 2015
LGTM |
mscdex
commented
Jun 9, 2015
LGTM but perhaps there should be a comment in case someone stumbles upon this and does not understand it? |
There was a problem hiding this comment.
What if state is undefined?
trevnorris
commented
Jun 16, 2015
@bnoordhuis What would you like to do here? |
chrisdickinson
commented
Jun 23, 2015
A note: we're really checking for |
Fishrock123
commented
Jun 23, 2015
@chrisdickinson if you're sure that's what it is then it sounds good to me.
|
Fishrock123
commented
Jun 23, 2015
Perhaps the original isn't an issue anymore with a newer v8?
From |
bnoordhuis
commented
Jun 23, 2015
@Fishrock123 You're not passing a request path. Try |
dcousens
commented
Jun 23, 2015
This should really just be We are not checking types anywhere else, as can be seen by the possible type explosion: |
cjihrig
commented
Nov 9, 2015
@bnoordhuis what is the status of this one liner? |
bnoordhuis
commented
Nov 9, 2015
Closing, I'll revisit when it comes up again. |
Replace a call to
isNaN(n)withn !== n. Removes most of theoverhead from the following hotspot:
R=@chrisdickinson, /cc @trevnorris
CI: https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/784/