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

[Trial]Enable LTO for wasm build #346

Closed
Dengjianping opened this issue Jan 11, 2022 · 4 comments
Closed

[Trial]Enable LTO for wasm build #346

Dengjianping opened this issue Jan 11, 2022 · 4 comments
Assignees
Labels
A-ci Area: Continuous Integration C-experiment Category: Experimental feature or tool P-low Priority: Low
Milestone

Comments

@Dengjianping
Copy link
Contributor

Dengjianping commented Jan 11, 2022

Now we only enabled LTO for native build. If someone is interested in this issue, just check this build.rs:
https://github.com/Manta-Network/Manta/blob/manta/runtime/calamari/build.rs

fn main() {
    WasmBuilder::new()
        .with_current_project()
        .export_heap_base()
        .import_memory()
        .append_to_rust_flags("-C opt-level=z")
        .append_to_rust_flags("-C linker-plugin-lto")
        .build()
}

Re-benchmark pallets to see whether the performance is improved.

@Dengjianping Dengjianping added this to the Future milestone Jan 11, 2022
@Dengjianping Dengjianping added the C-enhancement Category: An issue proposing an enhancement or a PR with one label Jan 11, 2022
@ghzlatarev
Copy link
Contributor

@Dengjianping also when building with SRTool ?

@stechu stechu added the P-medium Priority: Medium label Jan 28, 2022
@ghzlatarev
Copy link
Contributor

ghzlatarev commented Jan 31, 2022

@ghzlatarev ghzlatarev self-assigned this Jan 31, 2022
@Dengjianping
Copy link
Contributor Author

https://github.com/paritytech/substrate/pull/10747/files

I feel confused about this pr, why some benchmark go down a little bit.

@Dengjianping
Copy link
Contributor Author

I tried to enable LTO for wasm build, seems almost identical, some result are even worse.
And you can look at the result in substrate, the same to us.

For now, I don't think it will improve the performance a lot.

@ghzlatarev ghzlatarev added P-low Priority: Low and removed P-medium Priority: Medium labels Jul 30, 2022
@Garandor Garandor added C-experiment Category: Experimental feature or tool and removed C-enhancement Category: An issue proposing an enhancement or a PR with one labels Jan 4, 2023
@ghzlatarev ghzlatarev added the A-ci Area: Continuous Integration label Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ci Area: Continuous Integration C-experiment Category: Experimental feature or tool P-low Priority: Low
Projects
None yet
Development

No branches or pull requests

5 participants