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

Perf: use static table for Base16 #418

Merged
merged 1 commit into from
Sep 11, 2021
Merged

Conversation

hsyl20
Copy link
Contributor

@hsyl20 hsyl20 commented Sep 6, 2021

While working on https://gitlab.haskell.org/ghc/ghc/-/issues/19661 I've found that this could be optimized.

@Bodigrim
Copy link
Contributor

Bodigrim commented Sep 6, 2021

@hsyl20 thanks! Does it support big-endian platforms?

@hsyl20
Copy link
Contributor Author

hsyl20 commented Sep 7, 2021

Does it support big-endian platforms?

I think so. The Word16 returned by encode8_as_16h x for a given x will be different on big- and little-endian platforms (which I found surprising at first) but the promise is that when it is written its bytes are in correct order.

Copy link
Contributor

@Bodigrim Bodigrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests on s390x virtual machines seem to pass.

Copy link
Member

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Bodigrim Bodigrim merged commit b9b8725 into haskell:master Sep 11, 2021
Bodigrim pushed a commit to Bodigrim/bytestring that referenced this pull request Sep 12, 2021
@Bodigrim Bodigrim added this to the 0.11.2.0 milestone Nov 3, 2021
noughtmare pushed a commit to noughtmare/bytestring that referenced this pull request Dec 12, 2021
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 this pull request may close these issues.

None yet

3 participants