-
Notifications
You must be signed in to change notification settings - Fork 7.9k
zend_execute: Mark zend_get_executed_*()
as __attribute__((pure))
#18998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
CI Benchmark indicates a slight slowdown. Can anyone with a “reliable CPU” do another non-valgrind check to see if this actually resulted in regressions? My CPU is notoriously bad at benchmarking. |
First test looks to be slower. Edit: Second run approx. confirms.
|
Can relate |
b26e8a6
to
2fb856e
Compare
Coming from your other PR, I see now why you submitted this. |
2fb856e
to
edf10a4
Compare
Given that this PR seems to lead to a unclear performance degradation, I'd prefer not to merge it. We can investigate why it happens, and potentially create a bug report if we can identify a compiler-related culprit. It may also be alignment-related, as Niels mentioned. I have thought about a way to align the function offsets of two binaries when I encountered this issue myself, given that |
Also, for completion's sake: I tried to apply The entire PR showed a big degradation, although I don't remember by how much nor how I measured it. It would ofc be great if this unlocked some optimization opportunities. In that case, it might be better to go the automated route, rather than applying it bit-by-bit by hand. |
These functions do not modify the state of the program and depend on thread-safe global variables only.
edf10a4
to
c78e0d4
Compare
I've rebased this one a final time and now the Symfony Benchmark indicates an improvement 🤷 |
I will re-run my benchmarks later today. |
Let's wait for Ilija's benchmark, but I'm in favour of doing this. |
Based on cycles counted by
And a significant improvement on Zend/bench.php:
And a huge regression on Zend/micro_bench.php:
It does seem like this is most likely layout related. It would be really great to invest some time into this idea to hopefully solve this once and for all. Otherwise we keep wasting hours with people benchmarking and following false leads, or potentially dropping good changes. Alternatively we might try to run LLVM bolt on both binaries, but it's hard to tell how fair this comparison will be. I have now posed this question on the LLVM #bolt Discord channel. If you have other ideas, please share. |
These functions do not modify the state of the program and depend on thread-safe global variables only.
This is a possible precursor to #18995.