3 ms·
That was burst sort, not bubble sort. (That said, bubblesort can be fast if the data are usually very close to sorted - one example here is depth-sorting polyg
by taneq 7y ago
That was burst sort, not bubble sort.
(That said, bubblesort can be fast if the data are usually very close to sorted - one example here is depth-sorting polygons for a rendering engine on a highly constrained platform.)
- aratakareigen 7y agoSee also: https://en.m.wikipedia.org/wiki/Adaptive_sort https://en.m.wikipedia.org/wiki/Adaptive_sort Another example application of adaptive sorts is the sweep-and-prune broadphase collision detection algorithm that's somewhat commonly used in physics engines.