-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Help] Possible to build a FST at compile time? #145
Comments
Sure. Serialize it to a file and use something like once_cell to load it via include_bytes. It won't help do anything faster at runtime though. You might want a perfect hashmap instead. Not sure if 40 million is too big for that though. |
Thank you @BurntSushi for your response to this question and your work with FST. I've been thinking about this as well. Why would you say it wouldn't help? Baking the bytes into the binary would at least help during runtime in avoiding loading the map at runtime? |
I'm just saying that building an fstv at compile time won't make queries faster. It's the same bytes. This is unlike a perfect hash map for example. Obviously building an fst at compile time means you won't have to do it at runtime, and that may or may not be significant. |
@BurntSushi Thank you for your clear response! 🚀 Learnt alot from it. |
I have a problem which I think FST might solve:
Is it possible to build an FST at compile time to achieve (5)?
The text was updated successfully, but these errors were encountered: