-
Notifications
You must be signed in to change notification settings - Fork 461
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
Use Dynamic Profile-Guided Optimization #5216
Conversation
Sync phase has a different profile than regular execution. Does PGO need to realign after sync? |
It reprofiles on each restart; also for the lifetime of the running app. So as new methods are called it fast-Jit compiles them for fast startup; then after a number of calls will re-Jit them optimised using the data from those calls. It doesn't de-optimise methods and move back to profiling them once they have been optimised however if that is the question. Presumably sync phase will be calling different methods than regular execution; rather than causing the same methods to execute completely differently? (e.g. use a different concrete class behind an interface) |
|
Yes, only needs to be on the exe; not the libs |
It will re-optimise all the libs and exe, but not currently the runtime as that is already PGO optimised to a "ready to run" version. However in .NET 8; it will also revisit the runtime and reoptimize that for the running app with dotnet/runtime#70941 |
@kamilchodola do you want to test it in branch or should we merge it to master? |
I'd prefer merging it to master and test together with all changes for some time. |
* Use Dynamic Profile-Guided Optimization * Use for benchmarks also
Changes
Enable .NET 7.0 Dynamic PGO and on stack replacement
Example of experiences in the wild https://petabridge.com/blog/dotnet7-pgo-performance-improvements/
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Remarks
With this one weird trick