4 ms·
Rust hides operations like register-register vpshufb behind unsafe despite this instruction having no implications for memory safety and crashing on CPUs that d
by anonymoushn 3y ago
Rust hides operations like register-register vpshufb behind unsafe despite this instruction having no implications for memory safety and crashing on CPUs that don't support it (just like auto-vectorized "safe" code built for a different set of extensions than the CPU it's running on).
Zig formerly exposed a subset of SIMD operations via LLVM intrinsics, but this was a bug and was fixed, so we now must use inline assembly to recreate immintrin.h and arm_neon.h.
- pjmlp 3y agoDoesn't change the fact that neither immintrin.h or arm_neon.h. are listed on ISO C, or POSIX standards.
- anonymoushn 3y agoDoes this matter? Rust and Zig have no standard. Each has fewer compilers than C has compilers that ship these headers.