Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: The most efficient way for searching for an element in an array?

by salva (Canon)
on Jan 07, 2016 at 08:31 UTC ( [id://1152147]=note: print w/replies, xml ) Need Help??


in reply to The most efficient way for searching for an element in an array?

If arrays 2 and 3 are not too big and they fit in the available RAM, just convert them into hashes for faster lookup.

Otherwise, sort the three arrays using some external sort algorithm and then read them in parallel while looking for duplicates.

  • Comment on Re: The most efficient way for searching for an element in an array?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2024-04-23 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found