From: johnl@taugh.com   
      
   According to Terje Mathisen :   
   >> We knew it was possible to do runtime code generation, since it's an   
   >> ancient technique widely used by sort programs to speed up the inner   
   >> comparison loop, but we had enough trouble getting our programs to   
   >> work the normal way.   
   >   
   >40 years ago my own sort functions/programs would instead either extract   
   >the compound keys into a form that could be compared directly, or   
   >re-write (with a reversible transform) the data in place, so that it was   
   >trivially comparable.   
   >   
   >The final option was to extract a short prefix (8-bytes) of the key data   
   >and accept that the full sort would only deliver a partially sorted   
   >results, so that I had to do a final sort pass over each chunk of equal   
   >prefix.   
      
   I'm pretty sure you'll find all of those in sort programs from the 1960s.   
   Sorting used more computer time than anything else so they put a great   
   deal of work into making it fast.   
      
   See, for example:   
      
   https://bitsavers.org/pdf/ibm/360/os/R01-08/C28-6543-3_Sort_Merge_Feb67.pdf   
      
   --   
   Regards,   
   John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for   
   Dummies",   
   Please consider the environment before reading this e-mail. https://jl.ly   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|