Skip to content

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

joshtriplett
Copy link
Member

@joshtriplett joshtriplett commented Jul 13, 2025

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

@joshtriplett
Copy link
Member Author

cc @rust-lang/cargo

@joshtriplett joshtriplett force-pushed the call-for-testing-hint-mostly-unused branch 3 times, most recently from 1bf9f52 to ee5040b Compare July 13, 2025 07:11
Copy link
Member

@Kobzol Kobzol left a 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.

@joshtriplett joshtriplett force-pushed the call-for-testing-hint-mostly-unused branch from ee5040b to b5846cb Compare July 13, 2025 09:19

## Background

Some crates provide comprehensive APIs with a very large surface area, yet many
Copy link
Member

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.


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
Copy link
Member

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.

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