Skip to content

Conversation

@333-9
Copy link

@333-9 333-9 commented Jun 12, 2022

Doing some basic pointer/bit magic to compare 4 bytes for a requested character.

The code compares 4 bytes at a time, since this is faster than comparing 8 bytes
when the target character is in the first 32 bytes (on average).
But the most significant speedup is probably a call to strchr when the requested
character is a utf-8 byte (may be extended to all non-alphabetical characters).

@vaygr vaygr mentioned this pull request Jul 19, 2022
6 tasks
vigoux added a commit to vigoux/azy.nvim that referenced this pull request Sep 18, 2022
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.

1 participant