dex-v4 icon indicating copy to clipboard operation
dex-v4 copied to clipboard

Optimize compute units via compiler flags

Open armaniferrante opened this issue 4 years ago • 2 comments

The following Cargo.toml settings have been shown to reduce compute units

[profile.release]
lto = "fat"
codegen-units = 1

[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1

Example here https://github.com/project-serum/serum-dex/pull/159

armaniferrante avatar Nov 27 '21 15:11 armaniferrante

@armaniferrante is this still relevant? If so I don't understand why this isn't the default setting. Is there a hidden tradeoff?

ellttBen avatar Jun 08 '22 18:06 ellttBen

Slower compile times is the only one I'm aware of.

armaniferrante avatar Jun 08 '22 18:06 armaniferrante