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

Re: PL_comppad_name at run time?

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
September 24, 2014 07:17
Subject:
Re: PL_comppad_name at run time?
Message ID:
CAMoYMM8WS8W4dWD_pRPyuJVGzhM1KpcA5MNProBPbZOoQ9bLjA@mail.gmail.com
On 23 September 2014 17:38, Father Chrysostomos <sprout@cpan.org> 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
references.

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