Slides
- Perl literacy course
- Some words and definitions about sorting
- Why sort?
- Using Perl's sort
- Ascending lexicographical sorting
- Comparison operators
- $a and $b
- Case matters
- Case matters (cont.)
- Case matters -- example
- Lexicographical sort -- ASCII
- Descending
- Descending (cont.)
- Numerical sort
- How to sort a hash?
- Multi-subkey sorts -- sorting by several criteria
- Template for multi-subkey sort
- Using a subroutine
- Limitations due to stability
- Sortkeys
- Sortkeys (cont.)
- Sortkeys (cont.)
- Example for sortkey extraction
- Where can we optimize?
- Sorting a list of IP addresses
- Naive multi-subkey record sorts
- Computing a single packed-string sortkey
- Computing a single packed-string sortkey (cont.)
- Still inefficient
- Caching the sortkeys -- using a hash
- Caching the sortkeys -- using a hash (cont.)
- Caching the sortkeys -- using a hash (cont.)
- Caching the sortkeys -- in multi-key comparison
- Caching the sortkeys -- using multi-level cache
- A note about cached sorts
- The Orcish Maneuver (or-cache)
- The Orcish Maneuver -- example
- The Orcish Maneuver -- two-subkey comparison using two caches
- Efficiency flaws in the Orcish Maneuver
- The Schwartzian Transform
- The Schwartzian Transform (cont.)
- The Schwartzian Transform -- multi-subkey sort
- More about the Schwartzian Transform
- Something in-common to techniques we saw
- Can we do better?
- Packed Default -- the mechanics
- Packed Default -- example
- Packed Default -- key extraction samples
- Packed Default -- conclusion
- Sort in Perl 5.8
- Sort in Perl 5.8 -- MergeSort instead of QuickSort
- Sort in Perl 5.8 -- MergeSort instead of QuickSort (cont.)
- Bibliography
- Thank you