1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4 <TITLE> Sort Styles </TITLE>
6 <H3 ALIGN=CENTER>1.7: Sort Styles </H3>
7 <TABLE ALIGN="CENTER" BORDER=0 WIDTH="95%">
9 <TD WIDTH="25%" ALIGN="LEFT">
10 <A HREF="slide-0106.html">Prev</A>
11 <A HREF="slide-0108.html">Next</A>
12 <A HREF="index.html">Index</A>
15 <TD WIDTH="25%" ALIGN="RIGHT">Page 7/12
20 <li> Four different sorting styles to choose from
31 <li> Schwartian Transform (ST)
35 <li> Guttman-Rosler Transform (GRT)
38 <li> Each has its uses and advantages
40 <li> Styles are really different ways to cache extracted keys
42 <li> Caching keys moves key extraction from O( N log N ) to O( N )
44 <li> In larger sizes of sort sets, caching keys is a very big win
46 <li> This is a classic sort of arrays of numbers
49 <li> Compare this code to the generated code for the different sort styles
53 sort { $a->[0] cmp $b->[0] ||
54 $a->[1] cmp $b->[1]
59 <TABLE ALIGN="CENTER" BORDER=0 WIDTH="95%">
61 <TD WIDTH="30%" ALIGN="LEFT">
62 <A HREF="slide-0106.html">Prev</A>
63 <A HREF="slide-0108.html">Next</A>
64 <A HREF="index.html">Index</A>
66 YAPC::NA 2004, Buffalo, NY
67 <TD WIDTH="25%" ALIGN="RIGHT">Page 7/12
71 <TD ALIGN="CENTER" COLSPAN="3">
72 <FONT SIZE="-3">© 2004 Uri Guttman</FONT>