4 ms·
The article includes benchmarks of PHP8 beta on AArch64. Quoting: "PHP-8 plans to feature a new JIT compiler that optimizes the PHP byte-code in the Opcache. T
by timthorn 6y ago
The article includes benchmarks of PHP8 beta on AArch64.
Quoting: "PHP-8 plans to feature a new JIT compiler that optimizes the PHP byte-code in the Opcache. The JIT is currently developed on x86 and is based on Lua’s JIT. As Lua’s JIT supports ARM64, we work with PHP developers to enable and to tune the Opcache JIT in PHP-8 to get the best performance on AWS Graviton processors."
- sroussey 6y agoThat’s awesome. I haven’t kept up... last I saw they were rolling their own. LuaJIT is great.
- deleted 6y ago[deleted]
- aseipp 6y agoThey absolutely are rolling their own JIT (doing otherwise would reduce its value substantially or simply be infeasible.) The sentence above is just badly written in the original article. The PHP 8 JIT uses the "DynASM" library to help generate code in memory — which was originally developed for use in LuaJIT 1. (LuaJIT 2 does not use DynASM for its own runtime code generation, but it does use DynASM instead as a sort of "super" macro assembler when you compile it, making it easier to write its optimized, per-architecture interpreter.) But "just" putting encoded instructions in a memory buffer is the easy part of it all, and that's all DynASM does. You still need thousands of lines of code backing it up to actually generate the right instructions, and implement appropriate optimizations.