Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Autogenerate descending arrays

by bl0rf (Pilgrim)
on Mar 14, 2004 at 21:52 UTC ( #336544=note: print w/replies, xml ) Need Help??


in reply to Autogenerate descending arrays

aah! I completely forgot about reverse!
Thank you fellow monks for your feedback, testing also shows that reverse is twice as fast as my method. I'm happy there's more than one way to do it ( or anything ).

Replies are listed 'Best First'.
Re: Re: Autogenerate descending arrays
by kappa (Chaplain) on Mar 14, 2004 at 22:08 UTC
    By the way, using reverse is faster because this case is optimized as the action mentioned in the subject is very common :)
      How is it optimized?
        I stand corrected. Looks like foreach (reverse 1 .. 1000000) still generates a huge temporary list.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://336544]
help
Chatterbox?
[1nickt]: jdporter Maybe try IPC::Run3
[LanX]: Sandy Koufax is indeed rude. .. oO
[chacham]: Re: Re: pattern matching -- feeling stoopit a poll idea about centrists, is +8 -5, used to be +6/-6 how apropos :)is +8
[chacham]: ...errr... Re: poll ideas quest 2015 (political centrist)
[chacham]: ooh, late, nighty nite everybody

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (14)
As of 2017-05-24 21:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?