function(b,e){for(var c=0,d=b.length,a;c<=d;){a=~~((d+c)/2);if(b[a]===e)return a;b[a]>e?d=a-1:c=a+1}return-1}