Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^5: Create sort function from a text file (Sorting References: Schwartzian, GRT, Orcish, External, Parallel)

by eyepopslikeamosquito (Archbishop)
on Aug 19, 2021 at 05:08 UTC ( [id://11135952]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Create sort function from a text file
in thread Create sort function from a text file

Ah yes, sorting with the good old Schwartzian Transform and GRT. Brings back some happy memories!

Some Schwartzian Transform references:

Wow, the Schwartzian Transform features in one of PM's earliest historic nodes on Christmas Day 1999 by chromatic, one of the pioneer developers of the Everything Engine! Posting on Christmas Day shows chromatic must have enjoyed tinkering with the Schwartzian Transform as much as I did in the early years. :)

Nowhere near as many references for GRT:

Still fewer for the Orcish Manoeuvre:

Most of the eleven gold stars in Illuminations (category: sorting) were awarded to historical figures, including two gold stars to PM founder vroom himself:

See also:

External Sorting

On CPAN:

By creamygoodness (author of Sort::External):

Super-fast sorting modules by salva:

CPAN List::AllUtils sorting functions:

  • sort_by
  • nsort_by
  • rev_sort_by
  • rev_nsort_by

Other:

References Added Later

  • A Fresh Look at Efficient Perl Sorting - paper by Uri Guttman (sysarch) and Larry Rossler
  • YA Perl Advent Calendar by William 'N1VUX' Ricker of Boston.PM (2005)

Updated: Extra references added long after the original reply was made.

  • Comment on Re^5: Create sort function from a text file (Sorting References: Schwartzian, GRT, Orcish, External, Parallel)
  • Select or Download Code

Replies are listed 'Best First'.
Re^6: Create sort function from a text file
by hippo (Bishop) on Aug 19, 2021 at 10:30 UTC

    Thanks for these links (++). Very interesting.

    that GRT is tricky is shown by this necropost (by me!) pointing out a bug that lay undetected for 18 months in a node with 264 rep!

    In reading through what I presume to be the original GRT paper I was directed to Sort::Maker by Uri Guttman himself. It appears that this module is designed to help abstract away such trickiness and would likely be the approach I would take for such tasks in future. YMMV, of course.


    🦛

      Very interesting. Though I remember Uri wrote the original File::Slurp (which I never used because I hate dependencies) I didn't know about Sort::Maker.

      I remember Uri well from the early Perl Golf days (e.g. search for Uri in The Lighter Side of Perl Culture (Part IV): Golf) though I never met him in person. He seemed to be a lovely guy and an entertaining character, famous back then for his beard, pony-tail, glasses - and a penchant for tie-dyed T-shirts. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11135952]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found