3 ms·
On my 64bit Linux Firefox 29 desktop: codepoint : 1,172,182,887 ops/sec codepoint obj: 1,168,116,461 ops/sec No significant difference.
by mike-cardwell 12y ago
On my 64bit Linux Firefox 29 desktop:
codepoint : 1,172,182,887 ops/sec
codepoint obj: 1,168,116,461 ops/sec
No significant difference.
- acdha 12y agoChrome 34: function: 5,572,574 method: 903,375,064 Firefox 29: function: 1,747,475,085 method: 1,727,244,041
- bzbarsky 12y agoAny time you see jsperf numbers over about 1e9, that means that the testcase was compeletely optimized out by the JIT (presumably because it has no detectable side-effects so got dead-code eliminated). 1.7e9 iterations per second on typical modern 3Ghz hardware means 2 clock ticks or less per iteration. That's about enough time to increment the loop counter and compare it to the loop limit and nothing else.
- Stratoscope 12y agoIndeed, if you add a completely empty test case, it is only a tiny bit faster than the method version that appears to have such high performance. (jsperf doesn't allow a completely empty test, but you can use // to fool it.)