// HACKER NEWS — CYBERSECURITY
Fearless SIMD v1.0
It has come a long way since the original prototype 8 years ago. We are now confident that whatever it is you need, be it just autovectorization and multiversioning, or full-blown portable SIMD abstractions, or safe access to intrinsics and nothing more, Fearless SIMD will serve you well.
Instead of paraphrasing the changelog, I'd like to take this opportunity to reflect on the goals of Fearless SIMD, how it achieves them, and what sets it apart from other SIMD abstractions.
A common criticism leveled at portable SIMD abstractions is that they aren't performant enough, so we've put a lot of effort into making sure that Fearless SIMD never holds you back.
For example, when implementing portable abstractions for operations with different behavior in edge cases on different platforms, such as swizzles or floating-point maximum, we provide both a precise variant that's the same on all platforms, and a fast variant that returns a platform-dependent result for use when you expect the edge cases to never happen.
We also made it easy to express SIMD algorithms in terms of the hardware's native vector size, so that your code always takes full advantage of the hardware, no matter where it runs. Fixed vector sizes are also supported for algorithms that need them.
We also put a lot of effort into making sure the implementations of our portable SIMD operations are state-of-the-art, and even contributed improvements upstream - both to Rust and LLVM.
But if you need an instruction that isn't covered by portable abstractions, or want even more control, you can safely drop down to platform intrinsics with no overhead for the parts of your code that need it, and keep the rest simple and portable.
Thanks to safe access to intrinsics, there is no performance ceiling.
If you look up the source code of any other SIMD abstraction, you will find that it is full of unsafe code. Something like rg unsafe will turn up several thousand unsafe blocks.
But not in Fearless SIMD! The crate is carefully engineered not to require ad-hoc unsafe code.