3 ms·
Types in Rust have alignment as in C, and bad stuff may happen if you use unsafe code to violate alignment. It seems that at present, if you want to generate a
by hsivonen 10y ago
Types in Rust have alignment as in C, and bad stuff may happen if you use unsafe code to violate alignment.
It seems that at present, if you want to generate an unaligned SSE2 load/store, you have to rely on modern memcpy (spelled copy_nonoverlapping in Rust) optimization. See the first reply to
https://internals.rust-lang.org/t/unaligned-simd-sse2-in-particular-loads-stores/4336 https://internals.rust-lang.org/t/unaligned-simd-sse2-in-par...