Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: how to speed up dupe checking of arrays

by mjscott2702 (Pilgrim)
on Jul 31, 2007 at 12:35 UTC ( #629817=note: print w/ replies, xml ) Need Help??


in reply to how to speed up dupe checking of arrays

The reduce method available at List::Util may make this faster. I haven't benchmarked it (getting some weird benchmark results on my Win32/Cygwin install), but these calls are supposed to be REALLY fast.


Comment on Re: how to speed up dupe checking of arrays
Re^2: how to speed up dupe checking of arrays
by mjscott2702 (Pilgrim) on Jul 31, 2007 at 12:40 UTC
    Update: the module at List::MoreUtils actually has a uniq function that does exactly what you need. This may be faster?

      List::More-Utils is faster as my try but slower then the dupe checking while in while loop.
      problem might be the pass trough each element of the array wich becomee the main time consuming element.
      as i see it dosnt matte rmuch waht u use when u have kinda small arrays, but when u have arrays with several million elements, all the saved milliseconds count ;)

      kd ultibuzz

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://629817]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-12-20 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls