[sf-perl] Sorting vs. hash

Neil Heller nheller at silcon.com
Fri Mar 28 13:15:44 PDT 2008


It's easy to fill an array with 250,0000 or more strings?

Neil Heller
510-862-4387


-----Original Message-----
From: sanfrancisco-pm-bounces+nheller=silcon.com at pm.org
[mailto:sanfrancisco-pm-bounces+nheller=silcon.com at pm.org] On Behalf Of Andy
Lester
Sent: Friday, March 28, 2008 12:52 PM
To: San Francisco Perl Mongers User Group
Subject: Re: [sf-perl] Sorting vs. hash


On Mar 28, 2008, at 2:44 PM, Neil Heller wrote:
> Is it faster to sort the array and then iterate once through the list
> (writing selected ones to a new array) or write them all into a hash  
> (at
> which time duplicates would be naturally eliminated)?


It's easy enough to test it and not have to speculate idly.

--
Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance




_______________________________________________
SanFrancisco-pm mailing list
SanFrancisco-pm at pm.org
http://mail.pm.org/mailman/listinfo/sanfrancisco-pm



More information about the SanFrancisco-pm mailing list