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

perf: do thin LTO and singular codegen-unit on release #970

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

de-sh
Copy link
Contributor

@de-sh de-sh commented Oct 22, 2024

Fixes #224 .

Description

Optimize release builds without impacting compile times. The alternatives include:

  • Full/Fat LTO
  • More codegen-units
    With single codegen-unit we make the compilation a bit slow, but that is much better tradeoff when compiling for releases given the optimizations that can be gained. Similarly, Fat LTO didn't give much of a gain from binary size perspective, have to figure out if there were any gains in terms of memory locality, but that is a harder question to answer, thus chose to go with Thin LTO.

This PR has:

  • been tested to ensure log ingestion and log query works.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

Copy link
Contributor

github-actions bot commented Oct 22, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@de-sh
Copy link
Contributor Author

de-sh commented Oct 22, 2024

I have read the CLA Document and I hereby sign the CLA

nitisht added a commit to parseablehq/.github that referenced this pull request Oct 22, 2024

[profile.release]
lto = "thin"
codegen-units = 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is worth trying with FAT as well and see if we get any perf advantages. cc @nikhilsinhaparseable

Cargo.toml Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

PGO + Bolt
2 participants