3 ms·
Not sure how C++ compiler or SBCL compiler utilizes auto-vectorization. The Rust compiler is able to auto-vectorize tight loops to use SIMD without much prompt
by ww520 4y ago
Not sure how C++ compiler or SBCL compiler utilizes auto-vectorization. The Rust compiler is able to auto-vectorize tight loops to use SIMD without much prompting. E.g. the following uses SIMD automatically.
byte_array1.iter().position(|&x| x == digit)
- dgb23 4y agoI was shocked when I first heard about SIMD in a online lecture. Not by what it does. But by the fact that apparently every operation uses it, but most just throw away the result.