User Tools

Site Tools

Linear Search

The most basic of search algorithms.

Interestingly a simple implementation such as this can be faster than the builtin function indexOf(). This is caused by Javascript compilation to fast native code and the builtin functions doing more work, such as handling edge cases

λ linear_search

linear_search.txt · Last modified: 2015/02/02 08:28 (external edit)