-
Notifications
You must be signed in to change notification settings - Fork 10
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
PGO as part of cargo install? #39
Comments
That's an interesting idea. I don't think that it's possible with Cargo today, but even if it was, there are at least two large problems that I see with it:
|
Hmmm, that sounds practically intractable.Maybe a better idea is to make the flow for installing cargo binaries more amenable to pgo? Currently you'd have to git clone, checkout the latest tag (assuming there even is one), do pgo, and finally cargo pgo install --path (is that a thing?). And you're also left out from any updates, having to manually repeat this whole process each time. It makes more sense to keep around the profiles across updates since probably not all code has changed, and therefore the quality of the profiles will decay rather become useless immediately (I think). The ideal flow is probably something like: you cargo install as usual, but you can optionally run a separate command at any time to gather profiles for the binary and re-install. These profiles stick around and get reused across updates. Running the optional pgo-this-binary command would wipe the profiles if they came from an old version but append if it's the same crate version letting you build better profiles over time. That would definitely require an RFC though, so maybe too much of a pain. |
This would basically mean that And I'm not really sure that it's worth all this effort. If you want the fastest possible binary for a specific use-case, you'll want to do more things than just PGO/BOLT (LTO=thin, CGU=1, |
Yeah, it's be quite an effort for sure. Agreed that it's probably not worth it for now. |
Is it possible to ship the PGO/BOLT profile files with a crate such that a cargo install will use them? That would be quite powerful for rust ecosystem tools where people tend to prefer installing from source.
The text was updated successfully, but these errors were encountered: