4 ms·
SIMD intrinsics are unsafe, because reaching a SIMD intrinsic not supported by the host CPU is undefined behavior (in practice usually SIGILL).
by nikic 7y ago
SIMD intrinsics are unsafe, because reaching a SIMD intrinsic not supported by the host CPU is undefined behavior (in practice usually SIGILL).
- Avamander 7y agoSo most Rust builds are inefficient given they don't take advantage of modern instructions?
- kibwen 7y agoBy default Rust builds binaries that will run on any processor for the given target. If you want it to generate instructions that are processor-specific--thereby reducing the portability of the binary--you must pass an explicit compiler flag. Clang exhibits the same behavior with its -march and -mcpu flags, and I would assume GCC does as well.
- keldaris 7y agoSo SSE2 intrinsics should be safe for x86_64 builds?
- Narishma 7y agoYes.