[sf-perl] Sorting vs. hash
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?
From: sanfrancisco-pm-bounces+nheller=silcon.com at pm.org
[mailto:sanfrancisco-pm-bounces+nheller=silcon.com at pm.org] On Behalf Of Andy
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
> 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
More information about the SanFrancisco-pm