That's really interesting!
How does it behave with almost-sorted data?
How does it behave with almost-sorted data?
There's also some logic to handle the case where there are a lot of equal elements which also results in faster performance than the completely random case.