This is one of the reasons why the Larry-Rossler is so efficient.
I think that you are thinking of the Guttman-Rosler Transform?
my @sorted = sort { $b->{id} <=> $b->{id} || $a->{foo} cmp $b->{foo} } + @unsorted; # SLOW
Comparing $b->{id} to itself will not work very well.
In reply to Re^3: Rosetta Code: Long List is Long (Updated Solutions)
by jwkrahn
in thread Rosetta Code: Long List is Long
by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |