vorner / slipstream

Nudging the compiler to auto-vectorize things
Apache License 2.0
71 stars 4 forks source link

Make mul_add inline #14

Closed HadrienG2 closed 1 year ago

HadrienG2 commented 1 year ago

Experience shows that rustc can fail to inline it in some circumstances, which is Very Bad.

vorner commented 1 year ago

And I've seen the other effect, something getting inlined and being slower too… but OK.

Do you want me to make a release with this?

HadrienG2 commented 1 year ago

Indeed, excessive inlining can cause problems and the #[inline] directive should be used with reason. However, when something is meant to compile into a single SIMD instruction, it is definitely worth inlining :)

I do not need a release immediately as this only degrades the performance of multiple codegen units, and I'm currently stuck with a single codegen unit for other reasons... Just preparing for a bright future when I will someday be able to remove that codegen-units = 1 from my Cargo.toml and enjoy fast builds again ;)

vorner commented 1 year ago

OK, poke me when you feel like a release would be nice.