by bsaul · 6y ago · 0 comments
The vast, vast majority of PHP code you will find in the wild is running a more traditional stack, and those results are much lower down the list.
The results are still impressive though. PHP is very good at gluing fast C code together without slowing it down much. Especially Workerman is impressive, since it appears to still run a significant amount of PHP code.
[1]: https://github.com/walkor/Workerman [2]: https://www.swoole.co.uk/ [3]: https://github.com/rryqszq4/ngx_php7
I use swoole w/ laravel, still trying to figure out best ways to milk it for more performance, and also grok the way it handles async and passes variables around using swoole_Table.
But usually a JIT is made in a way that you can then move forward with your optimizations in small tested steps. So it makes sense for JITv1 to have a very similar performance as the non-JITed version. It probably generates highly familiar code. First make it do the same, then optimize.
PHP 8 is due for release in Dec 2020 and will feature a JIT compiler which is expected to improve performance even further.
Regardless of what people think of PHP, it's nice to see the PHP community tackle performace and resource usage as a major priority. A contrast to parts of the development community who seem to care very little for performance and resource usage.
If you change the stack with event driven, a pool and persistent application, you get that fast results.