sindresorhus / multiline

Multiline strings in JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optimization (~2x) on Firefox

radare opened this issue · comments

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/

Hah, thanks for providing the jsfiddle, though the difference is still practically meaningless.