On Mon, Apr 11, 2016 at 11:53 PM, Dmitry Stogov wrote:
> Or... maybe we shall move the function info related functions into the
> core? since we might have some optimization based on the function info
> instead of optimizing opcode only in the future.
>
> We consider, possibility of moving the wh
I think, It's going to be a part of opcache.
Today, all PHP processes use shared bytecode, with JIT we will in addition
share the native code.
Thanks. Dmitry.
From: Lin Yo-An
Sent: Monday, April 11, 2016 19:04
To: Dmitry Stogov
Cc: Xinchen Hui; Nikita Popov;
On Mon, Apr 11, 2016 at 11:53 PM, Dmitry Stogov wrote:
>
>
> We consider, possibility of moving the whole Optimizer into Zend, but it
> won't change a lot, because expensive optimization make sense only with
> opcache (when script is optimized once and executed many times).
>
Do you (or the team
Hi Yo-An
On 04/11/2016 02:54 PM, Lin Yo-An wrote:
Hi Dmitry,
How's it going?
I traversed the code of opcache extension, and just found the
FUNC_INFO related macros. I guess the accessor information is more
like an entry that should be put in the function info.
That, FUNC_INFO is available
Hi Dmitry,
How's it going?
I traversed the code of opcache extension, and just found the FUNC_INFO
related macros. I guess the accessor information is more like an entry
that should be put in the function info.
Or... maybe we shall move the function info related functions into the
core? since w
Yeah I know. I've saw that yesterday.
did you see my patch? It already uses run_time_cache of calling op_array to get
getter property offset.
It's also possible to "allocate" slots in "run_time_cache" of caller op_array
at compile_time, increasing op_array->cache_size. (see zend_compile.c), but I
don't see a big reason to do it.
On Tue, Apr 5, 2016 at 10:14 PM, Dmitry Stogov wrote:
> I think, op_array->type and op_array->fn_flags can't be reused.
>
> Also, usage of op_array->run_time_cache is safer (I remember, I saw some
> SIGSEGV with your patch and opcache.protect_memory=1)
>
Got it.Does run_time_cache vary when c
I updated my PR here
https://github.com/php/php-src/pull/1847/files#diff-3054389ad750ce9a9f5895cd6d27800fR3159
On Tue, Apr 5, 2016 at 10:02 PM, Lin Yo-An wrote:
> sorry, one typo, the "op_array->type" should be "op_array->fn_flags"
>
--
Best Regards,
Yo-An Lin
sorry, one typo, the "op_array->type" should be "op_array->fn_flags"
I think, op_array->type and op_array->fn_flags can't be reused.
Also, usage of op_array->run_time_cache is safer (I remember, I saw some
SIGSEGV with your patch and opcache.protect_memory=1)
Most probably, I'll able to return to this idea only at the end of the week or
even on next week.
Tha
Hi Dmitry,
Glad to hear your news, I just checked your patch and I like the approach
you've done. :]
I'm also still working on this idea this week, the const value accessor
support was just added today. And I guess we may also support setters in
the future (if possible)
my thought is:
- I thi
Hi Yo-An Lin,
I spent few hours working on your idea and came to the following path.
https://gist.github.com/dstogov/2221ffc21ac16311c958a4830dbcee0f
I tried to keep binary compatibility, minimize run-time checks overhead and fix
related problems and leaks.
BTW I'm not sure, if I like the p
I submitted the new benchmark result here:
Benchmark ResultGetter Method Only
https://gist.github.com/8cd230a5601cbe38439661adf3caca0d
Without getter optimization (3 runs):
151.0169506073ms
With getter optimization (3 runs)
39.201021194458ms
Template Engine Benchmark
https://gist.github.com/a2
Hi Xinchen Hui,
The magic get method is not being optimized. This optimization only
focuses on simple getter, which is used in a lot of OO-based appoications
like Symfony or Drupal.
Hi Dimitry,
Thanks for reviewing the code, comments are helpful. :) could you explain a
little bit of how runtime
>
>
>> I was playing with this idea sometime ago, it gives good performance
> boost for code like `for ($i = 0; $i < 10; $i++) $a->getFoo();` but in
> the end of the day it's a very limited optimization.
> If you abstract away from getters and say you want to optimize more and
> more small func
16 matches
Mail list logo