[Pitch] Unaligned Loads and Stores from Raw Memory

I agree with this statement in principle. There's actually no bindMemory pitfall with raw pointers, which is why this is such an important API.

On the other hand, we may want users reaching for the aligned version first. That saves them from some potentially serious performance pitfalls because of accidental misalignment, which they're very unlikely to find during testing. If they do in fact need misaligned access but reach for the wrong thing, they'll presumably find out quickly during testing.

I think this is highly debatable though. The backward source compatibility argument just tipped me over to the loadUnaligned side without some very strong evidence to counter it.

Incidentally, we could add a default aligned store along with storeUnaligned later. I just don't think that's worth doing until we have have a Trivial layout constraint.

1 Like