scandum / crumsort

A branchless unstable quicksort / mergesort that is highly adaptive.
The Unlicense
323 stars 9 forks source link

Meta algorithm #2

Closed LifeIsStrange closed 2 years ago

LifeIsStrange commented 2 years ago

Noob question, end users would love a solution that is optimal in all cases. As such, couldn't you detect cases where pdqsort or fluxsort are expected to be optimal and switch to them at runtime automatically ?

scandum commented 2 years ago

This is something crumsort already does, it switches to quadsort if doing so is beneficial.

Crumsort can't switch to fluxsort as that would turn it into an out-of-place sort.