... downthread ...
> I suspect quicksort will be enough though.
Somebody hasn't taken a freshman complexity theory class in a while...
(Note, this is tongue in cheek. Worst case is not average case and all that. I'm sure quicksort will do fine)
... downthread ...
> I suspect quicksort will be enough though.
Somebody hasn't taken a freshman complexity theory class in a while...
(Note, this is tongue in cheek. Worst case is not average case and all that. I'm sure quicksort will do fine)
Also, the worst case would be "systems take 2 ms extra time to boot" so it's not exactly a disaster.
Wait what - why don't you just sort it at build time then? I'm probably misunderstanding what you are saying or maybe just a premature optimization.
e: Nevermind, read further in the thread and saw you answered [0]
[0]: https://twitter.com/cperciva/status/1659561673278226432
(The SYSINITs are records in separate object files which are marked as going into a particular ELF section, so we don't actually have a complete list of them until we finish linking the kernel.)
It’s typically the fastest. It’s also a stable sort algorithm.
And perhaps even more unlikely if you permute the input sequence before sorting it.
I'm basing this off of my understanding of Skiena's discussion of quicksort in The Algorithm Design Manual.