|
|
|
|
|
by TurplePurtle
5202 days ago
|
|
Repeating what I said on Reddit: The Regexp vs. indexOf test seems a little misleading. Generally, .indexOf will be faster, but they seem to have performed a very specific test that requires the indexOf method to do some string concatenation before actually searching, which IMO invalidates the usefulness of the test. Please correct me if I'm wrong. The test I'm talking about: http://jsperf.com/regexp-indexof-perf |
|
You can see my full reply here: http://jsperf.com/regexp-indexof-perf#comment-3