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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

World's smallest micro-optimization #2318

Open
wants to merge 1 commit into
base: series/2.x
Choose a base branch
from

Conversation

kyri-petrou
Copy link
Collaborator

Full disclosure. This will probably have 0 meaningful impact to anyone's application, but I saw it the other day and couldn't help myself 馃ゲ I wouldn't be doing this is the previous code was intuitive or more readable, but I think they're both equally bad when it comes to readability.

Anyways, in APQs, instead of converting each byte into a string and extracting its 4-bit representation (hex), we just do the comparison on the fly avoiding materialising anything in memory.

@ghostdogpr
Copy link
Owner

Hum... 馃檮
I think the old one is definitely more readable 馃槄

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

2 participants