develooper Front page | perl.perl5.porters | Postings from July 2010

Re: [perl #76438] peephole optimiser could prune more dead code

Thread Previous | Thread Next
From:
David Golden
Date:
July 11, 2010 12:40
Subject:
Re: [perl #76438] peephole optimiser could prune more dead code
Message ID:
AANLkTikRuuwI1eVNOdjNbe6fyZOYb1QUEMB6YzMCXi0r@mail.gmail.com
On Sat, Jul 10, 2010 at 7:36 AM, James Mastros <james@mastros.biz> wrote:
> I do wonder, sometimes, if we worry entirely too much about just when
> tie and overload calls or done.  Would it break actual real-world code
> to not retrieve the value of $a (tie) or not boolify it (overload)
> when the value will be thrown away anyway?

I think explicitly clarifying that side effects (like magic) will not
happen if the compiler optimizes a block or expression is a good idea.

Then maybe we could use the less pragma when that isn't desired.  (
e.g. "use less 'optimization'" )

-- David

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About