by jedisct1 · 1mo ago · 0 comments
https://val.markovic.io/articles/philbin-the-safest-and-fast...
Performance is competitive with Zig, without using the "unsafe" keyword or nightly Rust.
Nice.
NGL, SIMD in Rust has not been a great experience. Philbin uses the "CPU Feature Tokens" pattern that the Fearless SIMD team (which the root article's author is a part of) came up with: https://shnatsel.medium.com/safe-simd-in-rust-even-on-the-in...
The pattern provides a safe abstraction for runtime CPU detection and SIMD dispatch. It's gnarly AF, but Fearless SIMD 1.0 came out a few days ago so people won't have to implement it themselves anymore.
I'd recommend grabbing that lib and giving SIMD-in-Rust another shot.