Re: Inline functions
| From: | Sara Golemon | Date: | Thu, 28 Apr 2016 17:39:34 +0000 |
| Subject: | Re: Inline functions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-92878@lists.php.net to get a copy of this message | ||
On Thu, Apr 28, 2016 at 1:21 AM, Dominic Grostate
<codekestrel@googlemail.com> wrote:
> As I understand it, the process by which the call stack is updated and
> scope changed, is quite expensive. And from tests I can see that function
> calls do actually add a not insignificant overhead to intensive repetitive
> tasks.
>
> So how difficult would it be to get the engine to determine if an inline is
> feasible, then skip the fcall init, and dump the a functions opcode emits
> directly into the current scope?
>
I'm actually working on a proof-of-concept of that already. I've
already got basic proxy methods getting inlined, and am working up
through expression methods and trying to resolve scoping with $this
and non-publics.
I'll publish a branch on github when I have something interesting to share.
-Sara