Enable codegen-units = 1 for the Release profile
zamazan4ik opened this issue · 1 comments
zamazan4ik commented
Is there an existing issue for this?
- I have searched the existing issues.
Describe the solution you'd like
I decided to test enabling codegen-units = 1 in the Release profile to see - can it improve Sniffnet somehow or not, e.g. from the binary size perspective. According to my tests (Fedora 41, Rustc 1.82, the latest Sniffnet version for the moment):
- Current Release profile: 39 Mib
- Release +
codegen-units = 1: 38 Mib
Build time was also somehow improved. The clean build takes 2m 32s instead of 2m 48s on my AMD Ryzen 9 5900x.
Is your feature request related to a problem?
It's not a problem - just a performance improvement piece of advice for additional optimization.
GyulyVGC commented
Hey thanks for your report, but I don't think in this case the improvements are enough to justify this setting, which in most cases could lead to slower build times.