1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4 <TITLE> Guttman-Rosler Transform (GRT) Sort </TITLE>
6 <H3 ALIGN=CENTER>1.11: Guttman-Rosler Transform (GRT) Sort </H3>
7 <TABLE ALIGN="CENTER" BORDER=0 WIDTH="95%">
9 <TD WIDTH="25%" ALIGN="LEFT">
10 <A HREF="slide-0110.html">Prev</A>
11 <A HREF="slide-0112.html">Next</A>
12 <A HREF="index.html">Index</A>
15 <TD WIDTH="25%" ALIGN="RIGHT">Page 11/12
20 <li> Caches extracted keys in a single string for each input record
22 <li> String records can be stored in that string
24 <li> Reference records have their index stored in the cache string
27 <li> The sorted indices are used to slice into the input array to create
31 <li> Key extraction is O( N )
33 <li> The comparison code is internal and uses C with no Perl callback (big
36 <li> More complex to use properly and efficiently
38 <li> GRT has special key description attributes for optimization
41 <li> Numbers can be integer/float, signed/unsigned
45 <li> Strings can be fixed/varying
49 <li> Fastest sort style for larger sets of sort records
52 <li> Pass 'GRT' option to make_sorter
58 map unpack( 'N', substr( $_, -4 ) ),
61 do{ my( $val ) = $_->[0] ; ( $val ) },
62 do{ my( $val ) = $_->[1] ; ( $val ) },
70 <TABLE ALIGN="CENTER" BORDER=0 WIDTH="95%">
72 <TD WIDTH="30%" ALIGN="LEFT">
73 <A HREF="slide-0110.html">Prev</A>
74 <A HREF="slide-0112.html">Next</A>
75 <A HREF="index.html">Index</A>
77 YAPC::NA 2004, Buffalo, NY
78 <TD WIDTH="25%" ALIGN="RIGHT">Page 11/12
82 <TD ALIGN="CENTER" COLSPAN="3">
83 <FONT SIZE="-3">© 2004 Uri Guttman</FONT>