2 ms·
I went ahead and modified the author's second benchmark (used to compare linear vs binary search) to iterate over various choices over words, rather than just s
by rrss 7y ago
I went ahead and modified the author's second benchmark (used to compare linear vs binary search) to iterate over various choices over words, rather than just searching for one word 10000 times (which may be the first on one run and the last on another).
Linear search: 0.92 +- less than 0.0001 s
Binary search: 0.15 s (also small variance, but didn't compute it)
We can talk as long as we want about mean vs minimum vs histogram vs etc, but let's go back to the beginning: you get what you measure.