3 ms·
One factor I don't think I've seen mentioned yet is how much lead time you have between the construction of the array and the need to search it. For example, s
by tzs 14y ago
One factor I don't think I've seen mentioned yet is how much lead time you have between the construction of the array and the need to search it.
For example, suppose the array is built when the program starts, but you know the need to search it will not arise until significantly later, and you also know that the program will have significant idle time in between. You could then use that idle time sort the array.