5 years from then, lot of changes happened in browsers. Now, indexOf performance has increased and is definitely better than any other custom alternative.
Chrome Version 49.0.2623.87 (64-bit)
More Related Contents:
- Convert JSON to array in Javascript
- jQuery: load pages with ajax, caching, clean URLs and back button support
- What is the difference between parseInt() and Number()?
- When to use Vanilla JavaScript vs. jQuery?
- Declaring multiple variables in JavaScript
- Array vs. Object efficiency in JavaScript
- Why is mutating the [[prototype]] of an object bad for performance?
- How to stop intense Javascript loop from freezing the browser
- What is the cost of ‘$(this)’?
- Should CSS always precede Javascript?
- Javascript when to use prototypes
- Does use of anonymous functions affect performance?
- JavaScript loop performance – Why is to decrement the iterator toward 0 faster than incrementing
- Is there a performance difference between ‘let’ and ‘var’ in JavaScript
- Efficient Javascript String Replacement
- Javascript prototype operator performance: saves memory, but is it faster?
- Are JavaScript Arrays actually implemented as arrays?
- Best way to execute js only on specific page
- Array Join vs String Concat
- Is “Put Scripts at the Bottom” Correct? [closed]
- Does the tag position in HTML affects performance of the webpage?
- Are ES6 template literals faster than string concatenation?
- HTML5 Canvas Performance and Optimization Tips, Tricks and Coding Best Practices [closed]
- draw 10,000 objects on canvas javascript
- How browser executes Javascript and renders asynchronously
- Enable smooth scrolling for my website in all browsers
- Extending String.prototype performance shows that function calls are 10x faster
- visibility:hidden vs display:none vs opacity:0
- What’s the best way (most efficient) to turn all the keys of an object to lower case?
- JavaScript Performance Long Running Tasks