As someone who had pretty much given up on Rust after being very disappointed with its SIMD support, and had stopped following developments in that area, I was genuinely surprised to see someone announce this today:
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: <a href="https://shnatsel.medium.com/safe-simd-in-rust-even-on-the-inside-c6f1ff381828" rel="nofollow">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.
jedisct1 · · focus · HN ↗
<a href="https://val.markovic.io/articles/philbin-the-safest-and-fastest-aegis-library" rel="nofollow">https://val.markovic.io/articles/philbin-the-safest-and-fast...
Performance is competitive with Zig, without using the "unsafe" keyword or nightly Rust.
Nice.
syncontrol · · focus · HN ↗
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: <a href="https://shnatsel.medium.com/safe-simd-in-rust-even-on-the-inside-c6f1ff381828" rel="nofollow">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.