Skip to content

chore: enhance cargo workspace and release build#680

Merged
h3nill merged 4 commits intobytebeamio:mainfrom
carlocorradini:workspace
Aug 17, 2023
Merged

chore: enhance cargo workspace and release build#680
h3nill merged 4 commits intobytebeamio:mainfrom
carlocorradini:workspace

Conversation

@carlocorradini
Copy link
Contributor

Related to PR #671

What has been changed:

  • Enhance cargo workspace utilization while avoiding repetitions
  • Updated release profile
    [profile.release]
    codegen-units = 1 # Better optimization
    lto = true # Link time optimization
    strip = true # Stripping

Copy link

@h3nill h3nill left a comment

Choose a reason for hiding this comment

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

one nitpick else LGTM

@swanandx
Copy link
Contributor

also does codegen-units = 1 really help in our case? Setting it to 1 doesn't guarantee better optimization, therefore just asking haha

@carlocorradini
Copy link
Contributor Author

@swanandx From official documentation:

This flag controls how many code generation units the crate is split into. It takes an integer greater than 0.

When a crate is split into multiple codegen units, LLVM is able to process them in parallel. Increasing parallelism ?may speed up compile times, but may also produce slower code. Setting this to 1 may improve the performance of generated code, but may be slower to compile.

Copy link

@h3nill h3nill left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @carlocorradini 🎉

@h3nill h3nill merged commit b7c3086 into bytebeamio:main Aug 17, 2023
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.

4 participants