- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 329
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
Add support for using Tracy with Roc #7706
Conversation
Tracy also helped me find a perf issue with how zig loads files: ziglang/zig#23274 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thank you for sharing this. It will be a very helpful guide to profiling the compiler.
Hmm, I don't know why this check just started failing now. I think it is also failing on main, but roc bootstrap has the static version of these deps. Not sure what is going on that is leading to bringing in the homebrew version. |
…strap
Ok, now I think we are all green with the typo fixed. |
Tracy is an awesome profiling tool that helps dive into performance and memory use.
They have an interactive demo at https://tracy.nereid.pl/.
Over the past week, some experiments I have done driven by tracy have lead to reducing the execution time of formatting 100 files of 1000 lines (all the grab bag syntax) by ~40%. Some work was merged with #7704, but more optimization are to follow.
I think that tracy will be a vital tool for creating a version of roc with peak performance. The implementation here is taken from the zig compiler (they also use tracy) and updated for zig version 0.14.0. I have only added a couple of tracing points related to parsing and formatting. I'm sure we will add more stages in the future. As long as tracy is not enable, all of this code is completely cleaned up and becomes a noop.
I tried to also write a general guide on profiling. It is very light, but mentions some tools I have used a lot.
Lastly, this PR updates our build script to: