[sf-perl] Sorting vs. hash

Andy Lester andy at petdance.com
Fri Mar 28 12:52:16 PDT 2008


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






More information about the SanFrancisco-pm mailing list