You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've just installed this project (through cargo install) and noticed the build was taking impressively long, I tracked this back to FatLTO being enabled (build with FatLTO takes 3m24s, while a modified Cargo.toml specifying lto="thin" takes merely 1m21s, shaving over 2 minutes off building on my machine (6c12t ryzen 2600)).
Is there any reason FatLTO is chosen over ThinLTO? Thin produces similar results (FatLTO binary is 14mb, while Thin is 19mb, this is negligible to most people) and takes a third of the time to build, which was very noticeable when I installed the project.
(worth noting no LTO takes 20mb, and surprisingly 1m25s on my machine, this is probably due to noise however)
The text was updated successfully, but these errors were encountered:
I did some additional testing with the knowledge that ThinLTO splitting is dependent on codegen-units.
Setting codegen-units = 2 with lto = "thin" results in a 17mb binary and takes 2m8s on my machine to cleanbuild. This is a better tradeoff than ThinLTO with the default codegen-unit split of 16, and is only 3mb more than FatLTO, while taking a minute less to build.
Reducing the codegen-unit count also allows more optimizations, so it is desirable if you want to speed up the program further.
Other tests: codegen-units = 4, lto = "thin": built in 1m20s, 18mb binary
Hi, I've just installed this project (through cargo install) and noticed the build was taking impressively long, I tracked this back to FatLTO being enabled (build with FatLTO takes 3m24s, while a modified Cargo.toml specifying
lto="thin"
takes merely 1m21s, shaving over 2 minutes off building on my machine (6c12t ryzen 2600)).Is there any reason FatLTO is chosen over ThinLTO? Thin produces similar results (FatLTO binary is 14mb, while Thin is 19mb, this is negligible to most people) and takes a third of the time to build, which was very noticeable when I installed the project.
(worth noting no LTO takes 20mb, and surprisingly 1m25s on my machine, this is probably due to noise however)
The text was updated successfully, but these errors were encountered: