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:
Leon Timmermans
Date:
July 10, 2010 16:25
Subject:
Re: [perl #76438] peephole optimiser could prune more dead code
Message ID:
AANLkTikDk1EaRl2pl-a62dX8T5uDKoV8fHbXm-Lg1mRk@mail.gmail.com
On Sat, Jul 10, 2010 at 9:16 PM, Ben Morrow <ben@morrow.me.uk> wrote:
> Quoth fawaka@gmail.com (Leon Timmermans):
> Most of those forms of magic don't have meaningful side-effects, though,
> at least on mg_get. (That is, they may have side-effects, but it doesn't
> matter if they aren't invoked. Tainting is the obvious exception.) This
> is what really matters from the pov of optimisation.
>

If you're only ignoring get magic and not set magic, I guess it's
possible if you special-case special variables with get magic such as
$!. @_ elements should probably also be exempt or else passing a tied
argument will break very confusingly. I'm not entirely sure what the
consequences of ignoring substr, pos and $#array and autovivication
get magic. I suspect they'll work in the common case, but will break
in corner cases.

Leon

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