Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 imbibing at the Monastery: (10)
As of 2014-08-30 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls