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

Re: Optimizing a double loop

by kyle (Abbot)
on Jun 03, 2010 at 14:37 UTC ( #842932=note: print w/ replies, xml ) Need Help??


in reply to Optimizing a double loop

This might be faster than your inner loop:

splice @arr, $from, $to-$from+1, map 1+$_, @arr[$from..$to];

...but I haven't tested it. If we had a full runnable example, we could do some Benchmarking.


Comment on Re: Optimizing a double loop
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-12-27 00:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (176 votes), past polls