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

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

Thread Previous | Thread Next
Jan Dubois
July 20, 2010 13:12
RE: [perl #76438] peephole optimiser could prune more dead code
Message ID:
On Fri, 16 Jul 2010, wrote:
> Dave Mitchell <> 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?


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About