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

Common hex lookup for pair of characters #75

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xtonik
Copy link

@xtonik xtonik commented Jun 17, 2023

Common hexadecimal lookup for conversion pair of characters from text representation to number is about 15% faster for both byte and char variants.

The gain was probably achieved by reduced number of conversion from / to int / byte and preshifting values for higher digit. As highest bit is used for detection bad characters, preshifted values must stored in array of shorts not to interference with the detection - the array occupies 256 bytes more.

I hope this pull request is not faulty as similar #70.

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.

2 participants