-
Notifications
You must be signed in to change notification settings - Fork 304
Call for Testing: Speeding up compilation with hint-mostly-unused
#1662
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: master
Are you sure you want to change the base?
Call for Testing: Speeding up compilation with hint-mostly-unused
#1662
Conversation
cc @rust-lang/cargo |
1bf9f52
to
ee5040b
Compare
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.
Great work! Left two comments.
ee5040b
to
b5846cb
Compare
|
||
## Background | ||
|
||
Some crates provide comprehensive APIs with a very large surface area, yet many |
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.
Perhaps it will help intuition to say this is for APIs that are monomorphic? Not sure how to put that.
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.
I attempted to cover this; let me know how the new version looks.
|
||
Note that this option does not provide a universal performance improvement for | ||
every crate. Using it for crates whose API surface is mostly used, and/or used | ||
in multiple different crates or binaries (e.g. multiple test binaries that each |
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.
I think this explanation really undersells the downside. The problem is that when misused, the flag either completely removes CGU partitioning or causes more items to be compiled in multiple CGUs than before. The way this paragraph is written currently makes it seem like the downsides don't apply if I know have one bin target and no tests.
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.
This paragraph does also explicitly say it's a bad idea for crates whose API surface is mostly used.
I'll try to make this paragraph clearer and more emphatic.
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.
@saethlin I've now expanded this paragraph, and made it much more emphatic about the potential downsides. Let me know if that looks better.
4b90258
to
f76bfcc
Compare
This blog post serves as a call for testing on the
hint-mostly-unused
feature: giving people guidance on how it can help and how to use it, providing
sample performance numbers, asking for specific testing, and pointing people to
a tracking issue for feedback.
Rendered