Re: Single Stack for all generators
| From: | Joe Watkins | Date: | Wed, 11 May 2016 15:02:49 +0000 |
| Subject: | Re: Single Stack for all generators | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-93242@lists.php.net to get a copy of this message | ||
404
Cheers
Joe
On Wed, May 11, 2016 at 3:54 PM, Dmitry Stogov <dmitry@zend.com> wrote:
> Hi,
>
>
> Nikita, please review the patch
> https://gist.github.com/dstogov/06116f1610f45f8152ine3a9927c6c243ac
>
>
> It's the next attempt to use the single stack for all generators.
>
> Now I don't see any problems or BC breaks.
>
>
> In case "yield" is used as an expression in context of function call. e.g.
> var_dump(yield), engine backups and then restores active call frame chain.
>
>
> Bob tested the patch on application that intensively uses generators, and
> reported:
>
> 15% less L2 cache loads
>
> 20% less cycle stalls due to memory subsystem
>
> 3% more CPU_CLOCK_UNHALTED due to additional freeze/restore.
>
>
> I'm going to commit this patch tomorrow.
>
>
> Thanks. Dmitry.
>