Optimization (~2x) on Firefox
radare opened this issue · comments
pancake commented
I have replaced the regular expression to use just indexOf and substr. it turns to be twice as fast in Firefox Nightly, but doesnt seems to affect on Chrome. I guess regular expression engine in V8 is better than the Mozilla one.
Here's the test: http://jsfiddle.net/8Nn4T/
Sindre Sorhus commented
Hah, thanks for providing the jsfiddle, though the difference is still practically meaningless.