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
I have ~150kb of code for blake2::blake2b::VarBlake2b::compress under -Copt-level=z, which is around 3x larger than any other function in my binary. It would be nice if it were smaller.
There's a good chance these would still get inlined and unrolled on -Copt-level=3 if it were written using #[inline] and a loop, but it would make a big difference to use cases where large code is undesirable.
The text was updated successfully, but these errors were encountered:
thomcc
changed the title
blake2 code size very high (overuse of#[inline(alway)]blake2 code size very high (overuse of#[inline(alway)]s?)
Oct 7, 2021
thomcc
changed the title
blake2 code size very high (overuse of#[inline(alway)]s?)blake2 code size very high (overuse of#[inline(always)]?)
Oct 7, 2021
I have ~150kb of code for
blake2::blake2b::VarBlake2b::compress
under-Copt-level=z
, which is around 3x larger than any other function in my binary. It would be nice if it were smaller.Looking at https://github.com/RustCrypto/hashes/blob/master/blake2/src/blake2.rs, a lot is
#[inline(always)]
, and theround
calls are manually unrolled.There's a good chance these would still get inlined and unrolled on -Copt-level=3 if it were written using
#[inline]
and a loop, but it would make a big difference to use cases where large code is undesirable.The text was updated successfully, but these errors were encountered: