onlyIDleft has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I have 2 very large arrays (~ 2 million ) that I need to extract the unique elements out of.The array elements themselves are long strings up to 60 or 70 characters each
What is the fastest way of performing this extraction? I tried to use the code from http://www.perlmonks.org/?node_id=335021, but my script is still running :( for > 8 hours!!!
use Quantum::Superpositions; @a2 = eigenstates(any(@a2) != all(@a1));
Please bless me with a faster way to extract uniques from each array list. Thank you all
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Compare 2 very large arrays of long strings as elements
by roboticus (Chancellor) on Oct 28, 2011 at 15:18 UTC | |
Re: Compare 2 very large arrays of long strings as elements
by SuicideJunkie (Vicar) on Oct 28, 2011 at 14:33 UTC | |
Re: Compare 2 very large arrays of long strings as elements
by GrandFather (Saint) on Oct 28, 2011 at 22:49 UTC | |
Re: Compare 2 very large arrays of long strings as elements
by johnny_carlos (Scribe) on Oct 28, 2011 at 14:50 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |
Back to
Seekers of Perl Wisdom