Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 pondering the Monastery: (8)
As of 2014-07-23 05:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (133 votes), past polls