Better array search
July 21st, 2009 | Programming, regular | No commentsUpdate: Added more data to show differences.
During the journey of finding a better linear array search function in javascript, I decided to write my own. I decided to take a different approach. Here’s the outcome.
Array.prototype.small_search = function(search) {
if (this[0] === search){ return 0; }
var s = ‘\x00′;
[...]