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

[perl #130643] run loop optimization

Thread Next
From:
Hugo van der Sanden via RT
Date:
January 25, 2017 15:07
Subject:
[perl #130643] run loop optimization
Message ID:
rt-4.0.24-2599-1485356842-113.130643-15-0@perl.org
On Wed, 25 Jan 2017 06:23:26 -0800, hv wrote:
> So I'm not sure what the best state for the runloop would be right
> now,
> but I suspect we should just remove the extra variable:
> 
> --- a/run.c
> +++ b/run.c
> @@ -36,10 +36,9 @@
>  int
>  Perl_runops_standard(pTHX)
>  {
> -    OP *op = PL_op;
> -    PERL_DTRACE_PROBE_OP(op);
> -    while ((PL_op = op = op->op_ppaddr(aTHX))) {
> -        PERL_DTRACE_PROBE_OP(op);
> +    PERL_DTRACE_PROBE_OP(PL_op);
> +    while ((PL_op = PL_op->op_ppaddr(aTHX))) {
> +        PERL_DTRACE_PROBE_OP(PL_op);
>      }
>      PERL_ASYNC_CHECK();

I've made a branch hv/runloop with this to make it easier for people to experiment with.

Hugo

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=130643

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