Skip to content

lib: fix expensive isNaN call in readable streams

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

R=@chrisdickinson, /cc @trevnorris

CI: https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/784/

Merge request reports

Loading