Skip to content

Add alias search fallback to character() #12

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

Merged
merged 4 commits into from
Sep 24, 2023
Merged

Conversation

youknowone
Copy link

@youknowone youknowone commented Feb 25, 2023

fix #11

Because I couldn't easily control the vendored generator, I used external phf crate for the last commit.
If you don't like it, it can be replaced by other stuff using first 3 commits which actually populating alias data.

cc @DimitrisJim

@progval
Copy link
Owner

progval commented Feb 25, 2023

Because I couldn't easily control the vendored generator

It's not vendored; feel free to change it

@youknowone
Copy link
Author

When I ran cargo run --release -- --phf, it generated different generated_phf to current one.
I am not confident to add a new database not breaking it.

@progval
Copy link
Owner

progval commented Feb 25, 2023

Ah yeah, it's not deterministic

@progval
Copy link
Owner

progval commented Feb 25, 2023

Why is it an issue, though? You could make it generate to src/generated_alias.rs and not commit the change to src/generated.rs.

Though it probably makes sense to replace the built-in perfect-hash with the phf crate altogether in a different PR. (We just need to check it doesn't come with size of perf drawbacks).

@youknowone
Copy link
Author

I didn't know it is not deterministic. I found db bugs here, so I will rewrite db part soon.

@youknowone
Copy link
Author

ok, bug is fixed but still phf is not ported.

@youknowone
Copy link
Author

rebase on master but still using phf crate

Co-Authored-By: Dimitris Fasarakis Hilliard <d.f.hilliard@gmail.com>
@progval
Copy link
Owner

progval commented Sep 1, 2023

@youknowone Looks like we're all done here. Am I forgetting anything?

@youknowone
Copy link
Author

The feature is done.
You may want to rewrite this patch using the internal phf implementation instead of phf crate

@progval progval merged commit 40b85a7 into progval:master Sep 24, 2023
@konstin konstin mentioned this pull request Oct 2, 2023
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.

unicode_names2::character("BACKSPACE") returns None
2 participants