3 ms·
They do. It's called auto-vectorization and the Rust compiler does it (mostly by virtue of LLVM). But there are thousands[1] of SIMD instructions just for x86_6
by burntsushi 9y ago
They do. It's called auto-vectorization and the Rust compiler does it (mostly by virtue of LLVM). But there are thousands[1] of SIMD instructions just for x86_64 alone and auto-vectorization doesn't come close to covering all of them. Even if auto-vectorization does cover the instructions you want to use, you might be justifiably uncomfortable with relying on it for performance in every case (or perhaps you simply can't rely on it), and would instead prefer to explicitly write out the transformations.
[1] - https://software.intel.com/sites/landingpage/IntrinsicsGuide/ https://software.intel.com/sites/landingpage/IntrinsicsGuide...