Talk in English - UK at PHP South Coast 2017
Short URL: https://joind.in/talk/57be5 (QR-Code (opens in new window))
The PHP compiler turns PHP code into “opcodes”, which are then executed on the Zend Virtual Machine. To improve performance, it is possible to optimize these opcodes prior to execution. PHP 7.1 introduces a sophisticated opcode optimization infrastructure, which uses static single assignment (SSA) form and type inference to enable more advanced optimizations.
An example: Normally, an “add $a, $b” instruction first has to check the types of $a and $b, to determine whether to perform an integer addition, or a floating point addition, or maybe even an array or GMP addition. However, if we can statically determine that $a and $b are integers, we can use a special “add_int $a, $b” instruction, which does not perform these type checks and thus improves performance. Because PHP is very dynamic, doing this is harder than it may sound…
This talk introduces the new optimization infrastructure, the optimizations based on it, and discusses which parts of the PHP language are particularly hostile to this form of optimization. This is an advanced talk, but I will try to present the topic in a way that does not require a strong compiler construction background.
Comments are closed.
Great deep-dive into the challenges (and opportunities) of opcode optimizations in PHP!
A great talk taking a peak under and seeing how opcode works and the difficulties with optimisation.
Well explained step-by-step guide to what is essentially hypothesis-driven-development; looking at how opcode optimisation works; and the need to assess everything based on the edge cases (even the unlikely ones), and not simply on typical usage, to determine whether it is a viable solution; and whether the benefits justify the time and effort required to implement.
While focused on opcache optimisations, the assessment and evaluation principles used could be applied in many normal development situations as well
Very interesting look under the hood of php showing the opportunities and challenges which present themselves when attempting to improve the performance of the language.
Great overview of the optimisations that PHP does (or attempts to do) behind the scenes, and what kinds of avenues the devs behind the PHP language are exploring to improve the performance of PHP even further.
A well explained insight into the challenges of Opcode PHP optimisation.
Really enjoyed the examples of things that make seemingly simple optimizations close to impossible, which really helps understand why they aren't (yet) being done.
Great technical exploration, really well explained.
A great talk. It's really interesting to learn a bit more about what goes on under the hood and the kinds of testing and research that goes on.
Every conference should have some kind of internals talk.
Fantastic talk that gave a really good insight into the struggles of the PHP devs to optimize a complex language. I thought the pacing was good and the content was great. 5/5
Really good talk on some of the optimisations of PHP internals but I went in with the impression that there'd be more information on how PHP developers could optimise the code the write. Maybe just make it a little clearer on the talk description?