develooper Front page | perl.perl5.porters | Postings from December 2007

Re: optimising opcodes

Thread Previous | Thread Next
Rafael Garcia-Suarez
December 30, 2007 08:16
Re: optimising opcodes
Message ID:
On 29/12/2007, Jim Cromie <> wrote:
> > 5: How do you spot code executed only once, and avoid doing this?
> >    (main program, eval blocks, top level code from do/require/use,
> >     BEGIN/UNITCHECK/CHECK/INIT/END - ie basically anything not a "real"
> >     subroutine definition)
> >
> Why do you think it matters ?
> Is it just avoiding cpu cycles doing stuff that has low/no payoff ?
> or is is caution/paranoia, or a specific reason ?

I think that should be avoided, and apply the optimisation to all
optrees. If we start producing different optrees for the same source
code depending on whether it's in a special block or not, there is a
small chance that bugs appear in one case and not in the other ones,
and they'll be difficult to spot.

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