HHVM engineer is here.
In server mode, HHVM will start the first N requests that it sees in interpreter-only mode (i.e., when JIT is disabled).
The default value in the optimized assembly is N = 11, so if you run the query 12 times, the 12th will be much faster.
You can configure this using the configuration option, for example: -v Eval.JitWarmupRequests=3 . If you set it to 0, you will immediately see acceleration.
There are several reasons for this.
Firstly, it prevents the effects of temporary demining from being affected by JIT-compiled code.
For example, for the first few queries, you may need to fill in the values ββin APC, which will cause the application code to go along different paths from established paths. Thus, we do not lose space in JIT compilations, which will be used only a few times.
Secondly, it allows HHVM to collect profiling data to improve future compilation.
If we notice that a certain value is an integer in 99% of cases, for example, we can compile code optimized for an integer case. We currently do not have the ability to compile JIT code with profiling enabled (the difficult part safely discards it when we finish with it), so we collect data in interpreter-only mode.
Owen Yamauchi Jul 28 '13 at 21:55 2013-07-28 21:55
source share