Re: [PHP-DEV] Inline functions

2016-04-28 Thread Dominic Grostate
I figured class methods would be a problem, especially if it were implemented at compile time as the compiler wouldn't necessarily know which class it refers to. Curious though, which part of the function call causes the performance hit? I've noticed that the number of parameters it has contribute

Re: [PHP-DEV] Inline functions

2016-04-28 Thread Nikita Popov
On Thu, Apr 28, 2016 at 8:39 PM, Dominic Grostate < codekest...@googlemail.com> wrote: > That sounds wicked. I look forward to benchmarking it and seeing how its > done. > On 28 Apr 2016 6:39 p.m., "Sara Golemon" wrote: > > > On Thu, Apr 28, 2016 at 1:21 AM, Dominic Grostate > > wrote: > > > As

Re: [PHP-DEV] Inline functions

2016-04-28 Thread Dominic Grostate
That sounds wicked. I look forward to benchmarking it and seeing how its done. On 28 Apr 2016 6:39 p.m., "Sara Golemon" wrote: > On Thu, Apr 28, 2016 at 1:21 AM, Dominic Grostate > wrote: > > As I understand it, the process by which the call stack is updated and > > scope changed, is quite expe

Re: [PHP-DEV] Inline functions

2016-04-28 Thread Sara Golemon
On Thu, Apr 28, 2016 at 1:21 AM, Dominic Grostate 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. > > S

[PHP-DEV] Inline functions

2016-04-28 Thread Dominic Grostate
Something in Dmitry's attribute RFC caught my attention. There is an example implying inline functions indicated by an attribute. I know that was only a potential use case for an extension. But it made me wonder how much that could improve PHPs performance if we actually had it. As I understand

[PHP-DEV] inline functions

2007-10-30 Thread Michael McGlothlin
I'm not sure if this is the proper place to make a suggestion - if not please correct me. It'd be useful to have an inline function similar to create_function () but so that it'd only be used that once and would return the function results rather than the function itself. I often find myself w