It creates a strong incentive to only write safe Rust, which is great for the vast majority of people.
It creates a strong incentive to only write safe Rust, which is great for the vast majority of people.
e.g. "mm256_shuffle_epi8" on X64+AVX2, ARM64+NEON and plain ARM: https://rust.godbolt.org/z/7rjKE93Kn
It currently only works with constant shuffle masks but dynamic shuffles are on the to-do list.
If it's to be portable it needs an extra instruction on one platform or the other because tbl and vpshufb do different things :(
That's a pretty tricky thing to get right, and with the consequence for getting it wrong being UB, at least a little fear is warranted.
This is like applications adding artificial delay to operations so users aren't surprised they complete so quickly.
User understanding is more important than definitional correctness.