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

Is this library endian-agnostic? #5

Open
BrannonKing opened this issue Jul 28, 2021 · 1 comment
Open

Is this library endian-agnostic? #5

BrannonKing opened this issue Jul 28, 2021 · 1 comment

Comments

@BrannonKing
Copy link

Some of the pointer casting in the library made me nervous. Why not use bytes.BigEndian.Put?

@itsmontoya
Copy link
Collaborator

@BrannonKing after tons of benchmarking, the pointer casting gave me the best performance and least allocation. I'm definitely all for removing scary code if there isn't a huge performance cost of using a stdlib func. I should have time to look into this within the next week. I'll create a branch with this change and do some performance testing against it. If there isn't much of a performance hit, I'll gladly switch over.

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

No branches or pull requests

2 participants