4 ms·
Or somewhere in there you discover that 99.9% of the time you only need the top ten elements in the list so sorting the whole thing is foolish anyway. Or that y
by hinkley 5y ago
Or somewhere in there you discover that 99.9% of the time you only need the top ten elements in the list so sorting the whole thing is foolish anyway. Or that you’re better off sorting the list as the data is collected in the first place because then the cost per entry is log(n), and reads swamp writes by a wide margin.