Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: counting backward (optimize foreach reverse low .. high

by Anonymous Monk
on Mar 02, 2013 at 15:39 UTC ( #1021434=note: print w/replies, xml ) Need Help??


in reply to Re^3: counting backward (optimize foreach reverse low .. high
in thread counting backward

Four orders of magnitude more memory, or a minus sign. My choice is simple; how about yours?

I'll use minus sign until perl5-porter optimizes foreach reverse rangeop

Or i'll use for;;;

  • Comment on Re^4: counting backward (optimize foreach reverse low .. high

Replies are listed 'Best First'.
Re^5: counting backward (optimize foreach reverse low .. high
by BrowserUk (Pope) on Mar 02, 2013 at 16:59 UTC
    Or i'll use for;;;

    It's a shame you can't use the c-style for as a modifier:

    cmpthese -1, { a=>q[ 1 for -1e6..0; ], b=>q[ for( my $i=1e6; $i; --$i ){ 1 } ] };; Rate b a b 14.0/s -- -26% a 19.0/s 35% --

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021434]
help
Chatterbox?
[erix]: lazyness-driven inventio :)
[erix]: "the dog ate my homework"
[Eily]: looks more like "all my plates are broken and I don't understand why. Also I can't retrieve the broken parts because the elephant in the room is on the way"
[ambrus]: Eily: also webpages aren't displayed on my monitor no matter what I click with the mouse, and there's a blackout right now, could that be a problem?
[robby_dobby]: ambrus: Yes
[hippo]: erix++: "the browser ate my code"
[robby_dobby]: Eily: Now, people are trying to be inventive with crowdsourcing their work, eh? Sure, call on the admins to k-line these sockpuppet accounts!
[robby_dobby]: hippo: I like how you equated your browser to a dog....

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2017-04-25 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (453 votes). Check out past polls.