Closed staabm closed 3 years ago
Hey!
Thanks for this contribution!
I've just tried to verify the 4% performance improvement using the phpbench benchmarks (available in this repository), and I don't really see the 4% improvement on my machine:
As you can see above, the best run is about ±10 microseconds faster with the change than without the change, however, the worst run is about ±300 microseconds slower than before the change.
Would you have the time/resources to do some more blackfire tests on this? e.g. doing the same parsing routine 20 times to get better averages?
thanks a lot!
agree, the perf improvement is not visible with phpbench. with blackfire it works though ¯_(ツ)_/¯
just verified on a newer php 7.4.16.. blackfire still agress the fn-call deleted with this PR shaves off 4-5%
Cherry-picked to main, thanks!
this function overhead call on the hot path is expensive (in take1)
getting rid of the fn call therefore translates into a small perf boost