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

feat(compiler): update compiler profiles #1562

Merged
merged 5 commits into from
Apr 13, 2024

Conversation

popcnt1
Copy link
Collaborator

@popcnt1 popcnt1 commented Apr 12, 2024

Summary

  1. remove useless profile.performance
  2. remove redundant configs which has included in default profiles
  3. using lto and coden-units =1 in release for better performance, bench result could be found here. Building time only +10% on my local machine. It's worse to do that because it's just a one-time compile time cost

popcnt-subodhi added 4 commits April 11, 2024 21:25
The benchmark profile previously had the debug option enabled. This commit comments out this section in the 'Cargo.toml' file, thus disabling the debug option. We want to avoid unnecessary debugging overhead during benchmarking tests:

1. code optimization: loop unrolling, inline, dead code elimination
2. extra instructions and data: less cache hit
3. branch prediction

only enable debug when error happened
1. The debug mode from the performance profile section has been removed in order to optimize runtime performance.

2. cli profile block has also been entirely removed from Cargo.toml, to simplify the configuration as it was redundant and unecessary.
The overflow checks have been activated in the release profile of the Cargo.toml file. This change doesn't significantly affect performance since branch prediction handles it quite efficiently. (actually almost no effect)
Removed the non-recommended 'performance' profile from the Cargo.toml and added link-time optimization (LTO) to the 'release' and 'bench' profiles. The thin version of LTO has been used for its balance between performance improvement and compile time cost. Also, inherited the 'release' profile to the 'bench' profile for consistent configurations.
Copy link

vercel bot commented Apr 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Visit Preview Apr 12, 2024 10:43pm

@jolestar jolestar merged commit 5d38c20 into rooch-network:main Apr 13, 2024
5 of 6 checks passed
@popcnt1 popcnt1 deleted the ci.morebench branch January 9, 2025 17:17
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.

2 participants