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

Peternator7/update phf logic #224

Merged
merged 13 commits into from
May 17, 2022
Merged

Conversation

Peternator7
Copy link
Owner

@Peternator7 Peternator7 commented May 15, 2022

After some benchmarking, allocating a string appears to be slower than doing the if-else chain until a pretty large number of variants is hit. With that in mind, updating the PHF logic to be slightly different in the case insensitive scenario.

  • store the natural case, lower case and upper case in the map.
  • check the map and always fallback to if-else if it isn't present.

@Peternator7 Peternator7 merged commit a952fc0 into master May 17, 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.

2 participants