Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Re+ :Perl Idioms Explained: && and || "Short Circuit" operators

by TimToady (Parson)
on Oct 23, 2003 at 18:03 UTC ( #301660=note: print w/replies, xml ) Need Help??


in reply to Re: Re+ :Perl Idioms Explained: && and || "Short Circuit" operators
in thread Perl Idioms Explained - && and || "Short Circuit" operators

I say this becuase its just as reasonable to assume that the optimizer could figure out that a chain of ifs can be represented by a jump table and do the same optimization there.

Indeed, Perl4 did precisely that. We kept threatening to do it in Perl5, but nobody ever got around to doing it. Perl6 will need to do it--the switch statement was designed with the assumption that it would be optimized in the simple cases.

  • Comment on Re: Re: Re+ :Perl Idioms Explained: && and || "Short Circuit" operators

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://301660]
help
Chatterbox?
[virtualsue]: weird. my p6 simple web spider fails to extract anchor tags from perlmonks.org
[holli]: Nice. Turns out I don't have to remove Sweet home Alabama from my playlist ;)
[Corion]: virtualsue: We have some links with a newline between <a and the attributes, maybe your extractor fails to handle that?
[virtualsue]: It's not getting any at all, which seems quite broken
virtualsue upgrades modules

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2017-12-13 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (360 votes). Check out past polls.

    Notices?