It's using a single pass bucket-sort as first step. Again note the absense of a sorting block.my %h; push @{$h{$_ cmp $top}}, $_ for @unsorted; my @sorted = (@{$h{0}}, sort(@{$h{1}}), sort(@{$h{-1}}));
In reply to Re^2: Optimizing a sort function (wrap-around alpha)
by Anonymous Monk
in thread Optimizing a sort function (wrap-around alpha)
by SineSwiper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |