Hmm... I'm surprised that introducing that temporary variable for swaps makes such a difference, but it does appear to. Do you have any explanation? Is it because it's saving a couple of array indexing operations, or is it just that ($x,$y)=($y,$x) is implemented suboptimally by Perl?
In reply to Re^3: quick sort. How do it faster
by tobyink
in thread quick sort. How do it faster
by builat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |