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

Nudge rustc to inline a few things more aggressively #347

Merged
merged 1 commit into from Jun 24, 2019

Conversation

@nical
Copy link
Collaborator

nical commented Jun 21, 2019

Rustc seems to be a bit shy about cross-crate inlining. It looks like even with thin lto inlined functions inside of inlined functions don't necessarily get inlined even for trivial things like to_vector() calling vec2() calling TypedVector2D::new.

This patch removes a bunch of instructions in a piece of code I was profiling earlier.


This change is Reviewable

@nical
Copy link
Collaborator Author

nical commented Jun 21, 2019

r? @kvark

@kvark
kvark approved these changes Jun 24, 2019
@kvark
Copy link
Member

kvark commented Jun 24, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Jun 24, 2019

📌 Commit 1f1bc45 has been approved by kvark

@bors-servo
Copy link
Contributor

bors-servo commented Jun 24, 2019

Testing commit 1f1bc45 with merge 78b9326...

bors-servo added a commit that referenced this pull request Jun 24, 2019
Nudge rustc to inline a few things more aggressively

Rustc seems to be a bit shy about cross-crate inlining. It looks like even with thin lto inlined functions inside of inlined functions don't necessarily get inlined even for trivial things like `to_vector()` calling `vec2()` calling `TypedVector2D::new`.

This patch removes a bunch of instructions in a piece of code I was profiling earlier.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/347)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 24, 2019

☀️ Test successful - checks-travis
Approved by: kvark
Pushing 78b9326 to master...

@bors-servo bors-servo merged commit 1f1bc45 into servo:master Jun 24, 2019
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.