Skip to content
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

always inline ScopeGuard::drop #242

Merged
merged 2 commits into from
Feb 23, 2021
Merged

always inline ScopeGuard::drop #242

merged 2 commits into from
Feb 23, 2021

Conversation

quininer
Copy link
Contributor

I accidentally discovered that some minor changes in a production project will cause a lot of size increase and some performance regression. After comparison, I found a lot of ScopeGuard::drop symbols appeared in the poorer version.

I suspect this is because the compiler missed some inline. for ScopeGuard, it should always be beneficial to inline it.

I accidentally discovered that some minor changes in a production project will cause a lot of size increase and some performance regression. After comparison, I found a lot of `ScopeGuard::drop` symbols appeared in the poorer version.

I suspect this is because the compiler missed some inline. for `ScopeGuard`, it should always be beneficial to inline it.
@Amanieu
Copy link
Member

Amanieu commented Feb 23, 2021

This should probably apply to all the methods in this file.

@quininer
Copy link
Contributor Author

I added more inline attributes to the file.

@Amanieu
Copy link
Member

Amanieu commented Feb 23, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Feb 23, 2021

📌 Commit 1ae6dc0 has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Feb 23, 2021

⌛ Testing commit 1ae6dc0 with merge b19c14a...

@bors
Copy link
Contributor

bors commented Feb 23, 2021

☀️ Test successful - checks-travis
Approved by: Amanieu
Pushing b19c14a to master...

@bors bors merged commit b19c14a into rust-lang:master Feb 23, 2021
@quininer quininer deleted the patch-2 branch February 23, 2021 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants