Compiling a WReach answer does lead to significant speedup. Using all the functions defined in the WReach answer, but overriding test to
test[s_,count_]:=Module[{data,f}, data=Table[{n,n^2}, {n,count}]; f=s[ToPackedArray[ N@data ]]; Timing[Plot[f[x],{x,-5,count+5}]]]
(this is necessary to make the resulting arrays be packed, thanks to Sjoerd de Vries for specifying this) and definition
ClearAll[stepifyWRCompiled]; stepifyWRCompiled[data_]:=With[{ len=Length@data ,sortedData=SortBy[data,First]}, Compile[{{arg,_Real}},Module[{min=1,max=len,i,x,list=sortedData}, While[ min<=max, i=Floor[(min+max)/2]; x=list[[i,1]]; Which[ x\[Equal]arg,min=max=i;Break[], x<arg,min=i+1,True,max=i-1 ] ]; If[0==max,0,list[[max,2]]] ],CompilationTarget->"WVM",RuntimeOptions\[Rule]"Speed"]]
(the With block is needed to explicitly insert sortedData into the code block that needs to be compiled), we get the results faster than the solution using Interpolation , albeit slightly:
Monitor[ tbl = Table[ {test[stepifyWRCompiled, l][[1]], test[stepifyWithInterpolation, l][[1]], test[stepifyWithBinarySearch, l][[1]]}, {l, 15000, 110000, 5000}], l] tbl//TableForm (* 0.002785 0.003154 0.029324 0.002575 0.003219 0.031453 0.0028 0.003175 0.034886 0.002694 0.003066 0.034896 0.002648 0.003002 0.037036 0.00272 0.003019 0.038524 0.00255 0.00325 0.041071 0.002675 0.003146 0.041931 0.002702 0.003044 0.045077 0.002571 0.003052 0.046614 0.002611 0.003129 0.047474 0.002604 0.00313 0.047816 0.002668 0.003207 0.051982 0.002674 0.00309 0.054308 0.002643 0.003137 0.05605 0.002725 0.00323 0.06603 0.002656 0.003258 0.059417 0.00264 0.003029 0.05813 0.00274 0.003142 0.0635 0.002661 0.003023 0.065713 *)
(the first column is compiled binary search, the second interpolation, the third, uncompiled binary search).
Note that I'm using CompilationTarget->"WVM" , not CompilationTarget->"C" ; this is due to the fact that the function is compiled with a large number of data points "inline", and if I use compilation in C with 100,000 data points, I see that gcc lasts for a long time and takes a lot of memory (I think the resulting The C file is huge, but I did not check). So I just use compilation for "WVM".
I think the general conclusion here is that Interpolation also just does a constant time search (binary search or something similar, presumably), and manual code is just a little faster because it is less general.