-
Notifications
You must be signed in to change notification settings - Fork 131
Sprinkle #[inline]
across the library
#1318
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: main
Are you sure you want to change the base?
Conversation
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
As a side effect of the deserialization refactor, there emerged two separate `impl` blocks for `Session`. This commit merges them, because they aren't separated in any meaningful way.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
This allows inlining across crates and so may bring performance gains to the users. After all, the decision whether to inline or not is left for the compiler, so it should never hurt.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 46 out of 46 changed files in this pull request and generated no comments.
Please read: You did not provide any benchmarks suggesting that this improves performance. You did not provide comparisions of release compile times. |
What's done
I went through all the code in our library and added
#[inline]
attribute topub
functions that are short enough to make sense to be inlined.Note that here are no changes to
scylla-macros
, because they only emit functions that are arbitrarily large (depending on the number of fields of a custom struct passed to the macros).Results
These are the changes in the binary size (left = after, right = before):
Conclusion
As you can see, there is a slight increase in the binary size of both libraries, as well as the integration test suite.
This is something that I'd expect if my changes do affect the compiler's inlining decisions.
Fixes: #949
Pre-review checklist
[ ] I added relevant tests for new features and bug fixes.[ ] I have provided docstrings for the public items that I want to introduce.[ ] I have adjusted the documentation in./docs/source/
.Fixes:
annotations to PR description.