News for hackers. Stuff that matters.
Re:Making Rust binaries smaller by default by flohofwoe on Wednesday January 24, 2024 @04:39AM (#39115443)
> you should normally optimise for speed, not binary size

IME optimize for speed vs size usually isn't as clear cut as the name says though, sometimes smaller code does indeed run faster, but in most cases I've seen there's not much of a difference between -O3, -O2, -Os and -Oz.

Re:Making Rust binaries smaller by default by kibwen on Wednesday January 24, 2024 @07:16AM (#39116391)
Weirdly, most of the time I find that -O3 produces smaller binaries than -Oz.