Closed oberblastmeister closed 1 year ago
What are you referring to when you say "read normally"? There's no way to make readByteArray
(from primitive
) perform an unaligned read.
Yeah I somehow got confused. I guess I was thinking about something like memcpy
where it is cross platform but readUnalignedByteArray
will fail on some architectures?
Closing since I'm not certain what this issue is asking for. The issue title is a request for a change to the library, but the body of the issue is questions about how GHC works. Open a new issue if there's still something actionable you'd like to see done.
On architectures that support unaligned reads should you still use
readUnalignedByteArray
or can you just read normally? Should you always use the unaligned variants if there is a possibility that the index is not aligned?