2 ms·
Bubble-sort is great if you have many cores to spare but no extra memory. It parallelizes nicely and works in-place. Insertion sort is great if you don't have
by glitchc 3y ago
Bubble-sort is great if you have many cores to spare but no extra memory. It parallelizes nicely and works in-place.
Insertion sort is great if you don't have any cores or memory to spare. It uses one core and works in-place.
Selection sort is much like insertion sort, runs in-place, single-threaded, but it will be faster if your CPU is much faster than your memory access as it uses more comparisons and fewer swaps.