4 ms·
Is it fast? I mean like, compared to QuickSort or others. Honestly asking -- I've not heard of Bead Sort before.
by cgijoe 6y ago
Is it fast? I mean like, compared to QuickSort or others. Honestly asking -- I've not heard of Bead Sort before.
- nimih 6y agoRuntime is proportional to g (the local gravitational constant), so if you find it's too slow, you can just run your algorithm in a centrifuge or on Jupiter to speed it up.
- t0astbread 6y agoPreparation is the killer though. Setup time for bead sort linearly scales with the sum of the values of the array. However, depending on your implementation setup and execution can be parallelized (for example on a Connect Four board in its default vertical orientation in an environment with gravity).
- dreamcompiler 6y agoThe numbers being sorted in Bead Sort are base 1, which means it's never faster than O[n] where n is not the number of numbers being sorted, but the largest number being sorted. That means it won't scale well and is impractical for sorting realistic numbers (barring a lot of special-purpose parallel hardware).