Re:Mir: Strongly typed IR to implement fast and lightweight ...
by charrondev on Wednesday December 27, 2023 @03:26AM
(#38780111)
LuaJit and PHP both use [DynASM](https://luajit.org/dynasm.html) as well.
[ Parent
| on HN ]
Re:Mir: Strongly typed IR to implement fast and lightweight ...
by binary132 on Wednesday December 27, 2023 @04:41PM
(#38787099)
TIL PHP uses dynasm, here I thought only LuaJIT did. Cool!
Re:Mir: Strongly typed IR to implement fast and lightweight ...
by charrondev on Wednesday December 27, 2023 @06:19PM
(#38788075)
Here’s the RFC for reference https://wiki.php.net/rfc/jit
It passed and landed in PHP 8.0.
Re:Mir: Strongly typed IR to implement fast and lightweight ...
by binary132 on Thursday December 28, 2023 @05:26PM
(#38799504)
I’m surprised their benchmark only saw a 200% performance improvement. LuaJIT is way faster than Lua in many cases.
Re:Mir: Strongly typed IR to implement fast and lightweight ...
by charrondev on Friday December 29, 2023 @11:04AM
(#38806357)
So the PHP implementation was built into the opcache extension which already gives a massive speed up over purely interpreted PHP.
If you benchmark JIT PHP vs PHP with no opcache you will see 500% speed up or more depending on the workload.
Of course most PHP web servers tend to be pretty IO bound. The project I work on sees ~a 20% in best case response time which is quite nice.