On Feb 27, 2015 5:23 PM, "Xinchen Hui" <larue...@gmail.com> wrote:
>
> Hey Internals:
>
>       I was looking Bob's switch optimization..
>
>       then I start to worry about where is the place optimization should
goes..
>
>       in generally, PHP is a  interpreted language. IMO, it should
> compiler the PHP codes to opcode without any optimization(of course,
> we did some, but they won't change a lots of opcodes which should be
> generated)..
>
>       and, since 5.5, we already have opcache bundled in..
>
>       thus, I am proposing a principle, that is:
>
>       in the future, we only do optimization in opcache side, and keep
> Zend Compiler without any optimization... considering Zend Compiler do
> things in -O0.
>
>       since, optimization always are dangerous.. if we only do them in
> opcache, user can still run them codes with disable opcache, or at
> least disable some optimization level which cause that..
>
>       what do you think?

As it sounds appealing, I am not a big fan of creating different scenarios
from a core perspective.

It will make the testing and maintenance harder, by  introducing extra
possible bugs.

If I am not mistaken, it was planed to have to integrate opcache in the
engine, making it part of it instead than a still optional extension. That
would be a better way and may open new possibilities.

Reply via email to