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

Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT #367

Open
zamazan4ik opened this issue Oct 7, 2023 · 3 comments
Open

Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT #367

zamazan4ik opened this issue Oct 7, 2023 · 3 comments

Comments

@zamazan4ik
Copy link

Hi!

Recently I did many Profile-Guided Optimization (PGO) benchmarks on multiple projects (including interpreters and compilers like CPython, Rustc, Clang, GCC, and many others) - the results are available here. So that's why I think it's worth trying to apply PGO to Berry tooling.

I can suggest the following things to do:

  • Evaluate PGO's applicability to Berry tooling with benchmarks.
  • If PGO helps to achieve better performance - add a note to Berry's documentation about that. In this case, users and maintainers will be aware of another optimization opportunity for Berry.
  • Provide PGO integration into the build scripts. It can help users and maintainers easily apply PGO for their own workloads.

Here are some examples of how PGO is already integrated into other projects' build scripts:

After PGO, I can suggest evaluating LLVM BOLT as an additional optimization step after PGO.

@skiars
Copy link
Member

skiars commented Oct 9, 2023

This should be able to be added once CMake build scripts #370 are supported? I'm not going to do this in Makefile because CMake is better.

@skiars skiars closed this as completed Oct 9, 2023
@skiars skiars reopened this Oct 9, 2023
@zamazan4ik
Copy link
Author

This should be able to be added once CMake build scripts #370 are supported? I'm not going to do this in Makefile because CMake is better.

If you are talking about integrating PGO build mode directly to the build scripts - yeah, it could be integrated directly into the CMake scripts. As an example, you can look at the following projects:

However, you can add PGO support even without CMake (e.g. via a dedicated Makefile command) - it's all up to you.

@skiars
Copy link
Member

skiars commented Oct 9, 2023

I want to do it in CMake because it's cross-platform and can generate Makefiles.

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