The state of SIMD in Rust in 2026
shnatsel.github.io - 58 poäng - 17 kommentarer - 204302 sekunder sedan
Kommentarer (5)
- sharktheone - 3000 sekunder sedanI am hoping for portable SIMD so much. But I still think that often a manually rolled SIMD will be faster.
Also the state of SIMD in Cranelift is also very WIP. They pretty much just support a subset of 128bit vectors with some rare exceptions.
- the__alchemist - 4292 sekunder sedanI am using my own lib, `lin_alg`, which apes core_simd for floating point values, and extends the concept to vectors and quaternions. I will eventually replace the floating point portions with core::simd upon its arrival in stable Rust.
Downside: It's currently x86 only.
- Archit3ch - 8320 sekunder sedanHot take: there is no portable SIMD.
You can either have performance (=write manual ASM for each platform), or portability, but not both.
What so-called "portable SIMD" libraries give you is "portable auto-vectorization". "Portable performance" is a global property of the algorithm. Relying on auto-vectorization will result in e.g. sub-optimal register spills in practice. The microbenchmarks will look great, though. ;)
- amelius - 3776 sekunder sedanCan we start using stainless steel instead?
- justmeeew - 8762 sekunder sedan[flagged]
Nördnytt! 🤓