Closed
Description
Description
This is a JIT buffer relocation experiment inspired by this blog
https://v8.dev/blog/short-builtin-calls
For 64-bit applications, branch prediction performance can be
negatively impacted when the target of a branch is more than
4 GB away from the branch.
We set up a big 500MB char array which is close to PHP .text segment
and use it as our own JIT buffer (originally allocated by opcache.so and
was close to opcache in virtual address).
In our benchmark, we found PHP interpreter achieved 2% performance
and much better branching performance.
Hopefully, you community experts can advise a more elegant and robust
method to implement this performance optimization.
Here is what did a super simple experiment and the reference patch: #8618