fix: make read_from_internal_position inline#149
Merged
spaskalev merged 1 commit intospaskalev:mainfrom Dec 5, 2025
Merged
Conversation
Owner
|
The myth about compilers being smart is busted once again, eh :) I dislike how I had to violate the neat position abstraction in the find free function and go deep with the internal read but that also was a significant performance improvement. Thanks for looking into it! |
Contributor
Author
right? This is sort of similar to the previous patch. I expected the compiler (gcc 15, mind you) to inline memset, but here we are. And you would almost expect -O3 to violate user inline hints to improve performance.
Of course! Thanks for the quick reply! |
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.
read_from_internal_position is essentially a wrapper for bitset_count_range, so inlining here makes sense.
Interestingly, this improves my
buddy_benchtime by about half a second!