3 ms·
I was surprised that this made a difference in doing a binary search. I figured that the cost of memory fetches would swamp the cost of index calculation. But t
by DerekL 9y ago
I was surprised that this made a difference in doing a binary search. I figured that the cost of memory fetches would swamp the cost of index calculation. But then I saw that his benchmarks were done on an array of length 2048, so that the entire array easily fits in the L1 cache.