News for hackers. Stuff that matters.
Re:Unconventional Sorting Algorithms by thehappypm on Thursday October 21, 2021 @01:40PM (#28948111)
I really like sleep sort because it trades (fundamentally) cycles and memory for time.

In theory you could do this in hardware. Hardware timers are pretty trivial, you could imagine a hardware chip that accepts a number, then writes the value to the next free slot in an array when the time has elapsed. As timers go off, the array fills up. Obviously you need to handle collisions and whatnot but nothing in this screams that you need to go O(n^2).

Re:Unconventional Sorting Algorithms by Sharlin on Thursday October 21, 2021 @02:32PM (#28948973)
You need n separate programmable timers, though. If you only have a constant number of timers, then you’re back to implementing something approaching a priority queue to schedule the events (possibly in hardware if you want)