Data structures · Sorting
When moving an item is expensive, a sort that swaps once per pass can beat one that swaps on every comparison.