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:
Jan Dubois
Date:
July 20, 2010 13:12
Subject:
RE: [perl #76438] peephole optimiser could prune more dead code
Message ID:
00fb01cb2847$e21b4c60$a651e520$@activestate.com
On Fri, 16 Jul 2010, hv@crypt.org wrote:
> Dave Mitchell <davem@iabyn.com> wrote:
> :However, for my opinions for the topic in hand...
> :
> :as regards tiedness, there are actually two orthogonal issues of
> :correctness. The first is which order in which the two $a's in $a.$a are
> :evaluated; the second is how many times $a is evaluated. It is quite
> :possible for the order not to be defined, but still for the fact that $a
> :is evaluated twice to be defined. For example, someone might be using tie
> :to instrument the number of accesses to a variable.
> 
> This agrees with my thinking - I do not care a jot about the order of
> evaluation for this case, but I would be unhappy about any change to
> the number of times magic is invoked unless there were first strong
> evidence presented that substantial improvements (to speed or something
> else) would justify the change.

Could you explain _why_ you would care about invoking magic twice, but
don't care about the order of evaluation?

And could you also explain why it makes sense that $a.$a has to invoke
magic twice, while $a x 2 will only call it once?

Cheers,
-Jan



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