Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: fastest way to compare two arrays

by krusty (Hermit)
on Apr 14, 2011 at 00:21 UTC ( #899316=note: print w/replies, xml ) Need Help??

in reply to fastest way to compare two arrays

So my brain hurt, but 2 seconds after I posted, I had an idea...
@hash{@range} = (1) x @range; #guess I don't need to replicate now. delete @hash{@ports}; @open = sort {$a <=> $b} keys %hash; #seems to work
I'd guess so, but until I Benchmark I don't know if its more efficient, but at least I can read it easier. If there are better ways out there, please share.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://899316]
Lady_Aleena clean up after dinner finally.
[Discipulus]: uch! so we are twice lucky to have MCE..;=)
[marioroy]: Working a midnight graveyard shift, on the way home ran out of gas. just 2 minutes later somebody stops with a small tank of gas. It's wierd. There's always someone nearby for some reason.
[Lady_Aleena]: I was the one who stop[ed in the middle of a cold night to pick up a small family walking to a gas station. I got a few gallons of free gas for the round trip, and the grandmother said she'd pray for me.
[marioroy]: Folks do not know it, but MCE was ridiculously difficult. At Niagra Falls, heard a voice on enabling Grace while in the mist boat. That 10x performance is possible.
[marioroy]: Lady_Aleena Angels on earth are real people. That's awesome.
[Lady_Aleena]: marioroy, what does MCE stand for in this instance? There are 3 pages of abbreviations to go through.
[Lady_Aleena]: ^ or Discipulus...
[marioroy]: Many-core Engine
[choroba]: MCE

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2017-05-29 08:26 GMT
Find Nodes?
    Voting Booth?