Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Compare 2 very large arrays of long strings as elements

by SuicideJunkie (Vicar)
on Oct 28, 2011 at 14:33 UTC ( [id://934411]=note: print w/replies, xml ) Need Help??


in reply to Compare 2 very large arrays of long strings as elements

Quantum::Superpositions doesn't sound like an appropriate module for efficiently comparing large arrays of strings, although in the future it might include some quantum XS code that will run very fast on a quantum CPU.

The easy way to extract unique items is to use a hash.

# for example my %counts; # count how many of each value you see. $counts{$_}++ foreach (@array); # Pull out only the ones you've seen exactly one of. my @uniques = grep {$counts{$_} == 1} keys %counts;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-03-29 07:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found