Re: php interpreter
On 05/24/2012 08:23 AM, Tom Boutell wrote:
> I've seen this statement before about the impact of caching the actual
> compilation (or mere tokenization?) to bytecode being very small
> compared to the impact of avoiding disk access. I am curious if there
> are any measurements breaking this down. Read-only access to code in
> files already buffered by the OS (not files read for the first time)
> ought to be very fast.
I don't think anyone has any hard numbers on what percentage is gained
from each of the optimizations that APC brings. There are actually 3
separate areas, not 2. The obvious skip-compile and skip-disk-read, but
also the fact that non-conditional functions and classes are cached and
the compiled op arrays modified to NOP out the DECLARE_FUNCTION and
DECLARE_CLASS opcodes.
The percentage gains are going to different depending on the
characteristics of your code. If you have thousands of functions and
classes but your code is relatively compact, then the function/class
caching might be more significant.
-Rasmus
Thread (7 messages)