Jenda Krynicky wrote: > ST is an overkill if the extraction is simple. > > Especially if the number of items is fairly small. > > Actually if the extraction is really simple and the extracted key is > not so small, than ST may perform worse than an ordinary sort doing > the extraction within the comparison block. The additional array > creation and destruction and increased memory load will more than > ofset the lower number of extractions.
Who cares? Modern computers are big enough and fast enough to handle everything except editing movies. The ST is a software pattern. Once you learn to recognize it, you can use it over and over by simply plugging in the values. The only thing that changes if the sort-field-extraction functions and whether a '<=>' or 'cmp' appears in the sort. All the rest is just copy & paste. -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/