8 ms·
With a modern Intel processor, it was much faster to go through a 10k integers array than sort it first and then do binary search. The small N is not that smal
by Shorel 4y ago
With a modern Intel processor, it was much faster to go through a 10k integers array than sort it first and then do binary search.
The small N is not that small anymore, and the difference speed between stack and heap is bigger now than ever.