-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Inline some encoding and decoding methods. #69281
Inline some encoding and decoding methods. #69281
Conversation
This is a small performance win.
Local
A small but clear win, not bad for such a simple change. |
@bors try @rust-timer queue |
Awaiting bors try build completion |
@bors rollup=never, because it affects performance. |
⌛ Trying commit 139c3ca with merge c503f7d1956eee59812f2d542b674e2c7e2777e7... |
r=me with perf improved |
☀️ Try build successful - checks-azure |
Queued c503f7d1956eee59812f2d542b674e2c7e2777e7 with parent 7760cd0, future comparison URL. |
Finished benchmarking try commit c503f7d1956eee59812f2d542b674e2c7e2777e7, comparison URL. |
It's a miniscule win, but a win nonetheless. @bors r=Centril |
📌 Commit 139c3ca has been approved by |
☀️ Test successful - checks-azure |
@@ -943,6 +943,7 @@ where | |||
|
|||
macro_rules! encoder_methods { | |||
($($name:ident($ty:ty);)*) => { | |||
#[inline] | |||
$(fn $name(&mut self, value: $ty) -> Result<(), Self::Error> { |
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.
The #[inline]
here is only applied to the first method. Always putting $(
on its own line would have avoided this. cc rust-lang/rustfmt#8 cc #71208
This is a small performance win.
r? @Centril