Samples nine elements from three equally spaced groups of three, takes the median of each group, then takes the median of those three medians as the pivot before partitioning.
Nine samples approximate the true median far better than three, producing more balanced partitions and fewer total comparisons on large arrays, at the cost of nine extra reads per partition step.