Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove upstream endianness conversion? #4

Closed
xJonathanLEI opened this issue Jan 12, 2022 · 0 comments · Fixed by #5
Closed

Remove upstream endianness conversion? #4

xJonathanLEI opened this issue Jan 12, 2022 · 0 comments · Fixed by #5
Assignees

Comments

@xJonathanLEI
Copy link
Owner

After inspecting the upstream code, it's found that the library converts between little endian and host endian if they're different. This forces library users to be aware of host endianess.

I'm gonna simply fork upstream and remove the conversion, and instead specifically document that all function inputs must be little-endian.

Alternative solutions considered:

  • Explicitly document that function inputs must conform to host endianess

    Not good as it forces users to be aware of host endianess, which is mostly irrelevant today.

  • Use target_endian to convert to big endian first if the host is big-endian

    No need to fork upstream, but has unnecessary performance costs on big-endian systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant