Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do you happen to have any benchmarks with JIT and libries like swoole?

I thought the same some days ago, but in theory, the output from JIT lives across requests so it shouldn't matter if its a long lived process or simply a normal PHPfpm process.

Also, the usual bottleneck in PHP is I/O.



in long running processes like Swoole, there is no web server running in front of PHP meaning PHP does some more heavy lifting which could benefit from JIT.


That is not entirely correct. Swoole already takes away a lot of the CPU heavy code, like HTTP protocol parsing by providing it in its C extension.

For one of my PHP extensions I benchmarked the C level implementation to be 5x faster than Jitted PHP code: https://beberlei.de/2019/03/25/the_jit_in_relation_to_php_ex...

So no, if your Swoole application does a lot of async I/O and its only in CPU code to delegate between I/O, then it will not benefit from the JIT.

"Long-Running process" alone doesn't mean that its CPU bound.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: