-
Notifications
You must be signed in to change notification settings - Fork 612
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
Investigate integrating with fast_float #1069
Comments
Hi, I would like to work on this one. Additionally, this will be my first time contributing to Valkey so it would be great if someone could review my work alongside. |
go for it, @swaingotnochill. You can tag us in your PR when it is ready for review. |
Thanks. I will start working on it and add you guys when I have a draft PR ready. |
@madolson @PingXie I looked at the fast_float, they have scripts to get it in a single header file to use. Then it's possible to create an interface to expose specific functions just like other dependencies in "deps" folder. And looking at Redis code, they have done something similar. Is the plan to replace the |
How would you expose an interface for a function with templating? Are you proposing simply initializing a version of that function for a type and exposing an interface for it?
|
Something like this: https://stackoverflow.com/questions/2744181/how-to-call-c-function-from-c (look at the top answer). |
I would say the numeric parsing in sorted_sets is the most important, but I see no reason to not replace all of the usage of strod. |
I've seen a couple of posts recently about how both dragonflyDB and Redis integrated with https://github.com/fastfloat/fast_float to improve parsing of doubles. We use strtod (exposed as getDoubleFromObject) in sorted set computation. The library was implemented in C++, but we should be able to extract out the needed code that solves our specific use case.
The text was updated successfully, but these errors were encountered: