![]() ![]() ![]() For example a case-insensitive search is way faster with regular expressions. While in Chrome 10 indexOf seems to be faster, in Safari 5, indexOf is clearly slower than any other method. The differences between the browsers is enormous. It cannot be said with certainty which method is faster. Regular expressions seem to be faster (at least in Chrome 10). Regular expression: (new RegExp('word')).test(str) ![]()
0 Comments
Leave a Reply. |