@OndrejMirtes@BohuslavSimek i would be skeptical how much performance you can get by rewriting to native code. to reach any reasonable speedup you would need to leave php land as early as possible and do as much in native code as possible without ever interacting with php userland.
@OndrejMirtes@BohuslavSimek data around. there's couple obvious things that might help a tiny bit by cutting some allocations
https://t.co/k0W3WrL6FL
but that's just a guess, i cannot get phpstan to run. i pull, then do composer install and then the process dies on mismatching type signatures somewhere
@BohuslavSimek (which took me over an hour) i found out that php jit for some reason doesn't like function parameters annotated 'callable'. it leads to drastic slowdown. why? not sure. can it be optimized? most likely.
@BohuslavSimek php couldn't guarantee safety of.
the performance picture is too murky to make simple statements. first we need to figure out where are we spending time, then understand why. only then we can make concrete plans what to do next. for example while researching this answer