Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 wandering the Monastery: (9)
As of 2015-07-29 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls