News for hackers. Stuff that matters.
Re:The state of SIMD in Rust in 2025 by Sharlin on Thursday November 06, 2025 @06:45AM (#45834164)
LLVM autovectorizes many FP operations just fine, the article was a bit strange in that respect. Problem is, there are many other cases where it's unable to do so, not because it can't but because it isn't allowed.
Re:The state of SIMD in Rust in 2025 by exDM69 on Thursday November 06, 2025 @06:59AM (#45834267)
In my experience, compiling C with -ffast-math will tremendously improve floating point autovectorization and optimizations to SIMD (C vector extensions, which are similar to Rust std::simd) code in general.

This obviously has a lot of caveats, and should only be enabled on a per function or per file basis.

Unfortunately Rust does not currently have options for adjusting per-function compiler optimization parameters. This is possible in some C compilers using function attributes.