Skip to content
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

Apply Profile-Guided Optimization to the project #2237

Closed
zamazan4ik opened this issue Jun 24, 2023 · 4 comments
Closed

Apply Profile-Guided Optimization to the project #2237

zamazan4ik opened this issue Jun 24, 2023 · 4 comments

Comments

@zamazan4ik
Copy link

Hi!

Profile-Guided Optimization (PGO) could help with improving the performance of the tooling for the Gleam project: compiler (like Rust Lang or C++), language server (like rust-analyzer or clangd).

Since the project is written in Rust, you can try to use cargo-pgo. More information about PGO applications on real-world software you can find here.

@lpil
Copy link
Member

lpil commented Jun 24, 2023

Hey! While this is cool I think we don't have any performance issues currently that warrant more work, and there's many simple low hanging fruit we can go for first, such as switching from reference counting to arenas for AST, types, and codegen, multi-threaded compilation, lazy loading modules, and regular profiling to identify mistakes in the code.

@zamazan4ik
Copy link
Author

But I think (that's just my feeling without actual knowledge of the codebase but with a knowledge how to apply PGO on Rust projects) PGO is easier to apply compared to "manual" changes to the codebase that you mentioned above. Also, PGO is still useful even if you apply all "log-hanging" optimizations.

@lpil
Copy link
Member

lpil commented Jun 24, 2023

Totally! It's more that I have very limited time so would not be able to explore this until much later, and then only when we have a need to improve performance.

@lpil lpil closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2023
@lpil
Copy link
Member

lpil commented Jun 29, 2023

Closing this as it's not to be worked on now, we can revisit this in future when optimal

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

No branches or pull requests

2 participants