4 ms·
While you're entirely correct that results can differ between browers, many of the links are to jsperf, which compensates for test-run variance and shows a comp
by ghusbands 15y ago
While you're entirely correct that results can differ between browers, many of the links are to jsperf, which compensates for test-run variance and shows a comparative graph of all results; some of those graphs demonstrate the opposite of what the linking slides say.
For an example, they link to http://jsperf.com/undefined-void0-perf http://jsperf.com/undefined-void0-perf to show that using void 0 instead of undefined is not a performance win. The data shows there's no browser in which void 0 is slower than undefined and several browsers in which is it faster, by as much as 50-60%.
- jdd 15y agoYou're right that there isn't a real perf win as each are millions of ops/sec vs more-millions and not likely to matter in real world use.
- gcb 15y agoReal world usage is relative. In my real world case a change in loop mattered a lot for ie6 users (60% of our use base at the time, sadly). It was .5sec that we couldn't get from other means.
- jdd 15y agoI doubt millions vs more-millions of ops/sec is ever going to be a real problem for anyone as engines are only getting faster. I've never heard someone say "Oh yeah, the bottleneck in our app was our use of `==`". The loops slides were more about modern engines not IE6 :P I've had mandated IE6 support before, and still support it in my personal JS libs, so I feel your pain.