* Ken Y. Clark <[EMAIL PROTECTED]>
> I don't know how many values you need to sort, but it's probably
> advisable to use a Schwartzian Transform.  Here's my suggestion:

Which in turn may be slower than a new sorting method:

http://www.sysarch.com/perl/sort_paper.html

  "Sorting can be a major bottleneck in Perl programs. Performance can
  vary by orders of magnitude, depending on how the sort is written. In
  this paper, we examine Perlīs sort function in depth and describe how
  to use it with simple and complex data. Next we analyze and compare
  several well-known Perl sorting optimizations (including the Orcish
  Maneuver and the Schwartzian Transform). We then show how to improve
  their performance significantly, by packing multiple sortkeys into a
  single string. Finally, we present a fresh approach, using the sort
  function with packed sortkeys and without a sortsub. This performs
  much better than any of the other methods, and is easy to implement
  directly or by using a new module we created, Sort::Records."

Reply via email to