Evaluate using Profile-Guided Optimization (PGO) for the Wingc compiler #5558
Labels
🛠️ compiler
Compiler
✨ enhancement
New feature or request
needs-discussion
Further discussion is needed prior to impl
Use Case
Potentially improve the Wingc performance.
Proposed Solution
According to my tests, Profile-Guided Optimization (PGO) helps with achieving better performance in many applications in different domains like compilers, static analysis, interpreters, etc like Rust, GCC, Clang, Go compiler (and many other similar projects). Since the Rust language supports PGO, and the Wingc compiler is written in Rust, it could be an interesting idea to optimize the compiler with PGO.
I can suggest the following things to do:
Implementation Notes
For the Rust project, I can recommend starting with cargo-pgo tool to perform PGO on a Rust program.
Here are some examples of how PGO is already integrated into other projects' build scripts/pipelines:
configure
scriptI would be happy to answer all your questions about PGO. I am not sure about how the Wingc performance is important right now - I am sure authors can decide better than me in this case :)
P.S. I thought the better place to share this idea is the Discussion GitHub section ("Ideas" part of it) but it seems like I don't have enough rights to create a discussion there - that's why I created the issue.
Component
Compiler
Community Notes
The text was updated successfully, but these errors were encountered: