"vscode:/vscode.git/clone" did not exist on "78644cdf4407f8f9215939f486394b3a4285915f"
feat: enable LTO and codegen-units = 1 optimizations (#279)
#### Overview: This PR enables more aggressive compiler optimizations for the project which should lead to better performance and smaller binary sizes. In this PR, I decided to use Fat LTO instead of ThinLTO since it provides higher optimization level. I have made quick tests (AMD Ryzen 5900x, Fedora 41, Rust 1.85.1, the latest version of the project at the moment, `cargo build --release` command) - here are the results about the binary size improvements. | Binary\Build mode | dynamo-run | libdynamo_llm_capi.so | http | llmctl | metrics | mock_worker | | --- | --- | --- | --- | --- | --- | --- | | Release | 55 Mib | 14 Mib | 19 Mib | 14 Mib | 21 Mib | 14 Mib | | Release + `codegen-units = 1` + ThinLTO | 43 Mib | 11 Mib | 15 Mib | 11 Mib | 17 Mib | 11 Mib | | Release + `codegen-units = 1` + FatLTO | 38 Mib | 9.2 Mib | 13 Mib | 9.6 Mib | 15 Mib | 9.6 Mib | #### Details: Enable `codegen-units = 1` and Fat LTO for better optimizations. #### Where should the reviewer start? Just check the `Cargo.toml` file ;) #### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) - closes GitHub issue: #278
Showing
Please register or sign in to comment