6 ms·
> PHP uses a JIT from Lua. Wow, TIL! I was certain this is a mistake, but apparently PHP uses DynAsm (https://wiki.php.net/rfc/jit https://wiki.php.net/rfc/jit
by purplesyringa 2mo ago
> PHP uses a JIT from Lua.
Wow, TIL! I was certain this is a mistake, but apparently PHP uses DynAsm (https://wiki.php.net/rfc/jit https://wiki.php.net/rfc/jit), which was developed for LuaJIT (https://luajit.org/dynasm.html https://luajit.org/dynasm.html). Cool stuff!
To answer your question, probably not. I dated the PHP change that added this "optimization" back to 2014 (https://github.com/php/php-src/commit/b547e1358d3846fad4cd0c86e2d2e9f5a9039b35 https://github.com/php/php-src/commit/b547e1358d3846fad4cd0c...), while DynAsm only started being used around 2019 (https://wiki.php.net/rfc/jit https://wiki.php.net/rfc/jit). I think this is just convergent evolution.
(I'm putting "optimization" in quotes because it changes semantics.)