develooper Front page | perl.perl5.porters | Postings from January 2022

Re: Benchmarking a 'no-snails' world (was: Re: PSC #049 2022-01-07)

Thread Previous | Thread Next
From:
Tony Cook
Date:
January 17, 2022 23:24
Subject:
Re: Benchmarking a 'no-snails' world (was: Re: PSC #049 2022-01-07)
Message ID:
20220117232408.GH3065@venus.tony.develop-help.com
On Tue, Jan 18, 2022 at 07:17:13AM +0800, Tom Molesworth wrote:
> On Tue, 18 Jan 2022 at 06:52, Tony Cook <tony@develop-help.com> wrote:
> 
> > On Mon, Jan 17, 2022 at 06:28:19PM +0000, Paul "LeoNerd" Evans wrote:
> > > since in order to make pp_arg* work at all we still have to
> > > copy the args to the AV found in PAD_SVl(0).
> >
> > (Sorry I can't type a lot right now.)
> >
> > Can't entersub leave the arguments (and mark) on the stack for a
> > signature sub and pp_argelem access the arguments on the stack
> > instead?
> >
> > The final argelem would need to pop the mark and clean up the stack.
> >
> > This would save the cost of setting up the AV.
> >
> 
> That sounds like a big change in behaviour? It seems like this would lead
> to the following situation:
> 
> - everything in the signature is now an alias instead of a copy
> - signature args are no longer refcounted (stack-not-refcounted has long
> been a source of various problems!)

The values would be copied to the lexicals just as they are now.

The only change is the source of the values, right now it's the
unrefcounted @_, with my suggestion above they would come from the
unrefcounted stack.

Tony

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