Repository navigation
Add -falign-loops=32 to stabilize benchmark results - #100914
Merged
Merged
Conversation
We already use `-falign-functions=64` and `-mbranches-within-32B-boundaries` to reduce performance sensitivity to code layout changes. Adding `-falign-loops=32` extends this to loop headers: when a hot loop body shifts by a few bytes due to an unrelated code change, it can cross a cache-line or instruction-fetch boundary, causing a small but stable performance regression or improvement that has nothing to do with the actual change. Padding loop entries to a 32-byte boundary makes this much less likely. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Contributor
|
Workflow [PR], commit [e60cb39] Summary: ✅ AI ReviewSummaryThis PR adds Missing context
ClickHouse Rules
Final Verdict
|
Member
Author
|
This sounds very doubtful to me, but why not try? |
1 task
Member
Author
|
No slower queries. So this change might help. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We already use
-falign-functions=64and-mbranches-within-32B-boundariesto reduce performance sensitivity to code layout changes. Adding-falign-loops=32extends this to loop headers: when a hot loop body shifts by a few bytes due to an unrelated code change, it can cross a cache-line or instruction-fetch boundary, causing a small but stable performance regression or improvement that has nothing to do with the actual change. Padding loop entries to a 32-byte boundary makes this much less likely.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add -falign-loops=32 to stabilize benchmark results
Documentation entry for user-facing changes