develooper Front page | perl.perl5.porters | Postings from September 2014

Re: PL_comppad_name at run time?

Thread Previous | Thread Next
Rafael Garcia-Suarez
September 24, 2014 07:17
Re: PL_comppad_name at run time?
Message ID:
On 23 September 2014 17:38, Father Chrysostomos <> wrote:
> Currently we set up PL_curpad to point to the sub’s pad in
> pp_entersub.  But anything that needs to access the name pad (only
> lexical subs, I think) has to call find_runcv, which searches the call
> stack, and then extract the name pad from it.
> If we introduce lvalue references (which I am working on now), lexical
> scalars and state variables will have to access the name pad.  That
> will slow things down considerably.
> I know that pp_entersub avoids unnecessary work because it is very hot
> code, but I think that having it set PL_comppad_name (or maybe a new
> PL_curpad_name) would be a reasonable tradeoff.
> Thoughts?

I'm tempted to say that this ship has already sailed, and thus go for it.
I think the tradeoff is ok, because of the potential benefits of lvalue

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