[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] hash slicing (was: weird behavior with sort and unique-ing)



>>>>> "AL" == Andy Lester <andy@petdance.com> writes:

  AL> Wow, I just went and looked at some of my code and my standard
  AL> dedupe function takes 40x as long as the hashslice version.

hash slicing is one of the most underutilized features in perl.  since
it does its loop internally in c, it is fairly fast. as larry rosler and
i (and others) have noted, usually the fastest perl has the fewest perl
operators. for more on hash slices check out my tutorial on them:

http://www.sysarch.com/perl/tutorials/hash_slices.txt

have the appropiate amount of fun,

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe