Skip to content

Switch to hashify phf, gain extra 20-30% unescape speed-up #83

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

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

Conversation

xamgore
Copy link

@xamgore xamgore commented Feb 25, 2025

See #82 for details.

@danielparks
Copy link
Owner

danielparks commented Mar 4, 2025

Thanks for the PR! Sorry it’s taken me a while to get back to you — I’ve been sick, but now I’m better.

I wonder if it wouldn’t make sense just to switch to hashify entirely rather than phf? That would break the API and require a major version bump, but I imagine it wouldn’t cause a problem for most people.

The big issue right now is that cargo msrv is reporting that the MSRV is now 1.74.1, but the errors that older versions are throwing make me think this might be something that could be worked around. I'll dig into it more. (1.74.1 is more than a year old, so maybe just bumping MSRV is the way to go. Just figured I should check if it was something trivial first.)

@danielparks
Copy link
Owner

Ah, I see, hashify can’t generate something like ENTITIES.

@xamgore
Copy link
Author

xamgore commented Mar 4, 2025

Yeah. phf provides the Map interface, I may ask hashify authors for something similar or even propose a PR. As well as downgrade the msrv. The source code is trivial, it would be easy.

  • fix clippy warnings
  • fix hashify msrv
  • implement Map interface inside hashify

@xamgore xamgore changed the title Switch to hashify phf, gain extra 20-30% unescape speed-up WIP: Switch to hashify phf, gain extra 20-30% unescape speed-up Mar 4, 2025
@xamgore xamgore marked this pull request as draft March 4, 2025 09:26
@xamgore xamgore changed the title WIP: Switch to hashify phf, gain extra 20-30% unescape speed-up Switch to hashify phf, gain extra 20-30% unescape speed-up Mar 4, 2025
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