-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Remove fast-float crate? #13035
Comments
I can run a quick benchmark today to see if there's a significant performance difference if we remove the dependency, and if not we can just remove it. |
A bit late, I did do the benchmark and there was essentially no difference between the stdlib parse and There is however another problem: unsafe {
// SAFETY: this is technically not ok, but the first line of
// the stdlib parse implementation calls s = s.as_bytes()...
std::str::from_utf8_unchecked(bytes).parse().ok()
} We directly want to parse bytestrings which |
Relevant stdlib proposal: rust-lang/libs-team#287. |
I believe the bytes is the reason we use fast-float indeed. I'd say let's wait. |
To summarize, I understand that polars still depends, and only depends on Why am I asking? I'm interested because |
Yes, if |
I went through a code review process when importing dependencies of Polars. Some questions/cocnerns popped up about |
@ritchie46 would it be acceptable to make Or even a manual impl copied from the stdlib (i think this might be too much code) |
To my knowledge |
Someone needs to file an issue about it with detail (sorry, IMO that should have happened first), but basically in the process of an unsafe audit we discovered that |
Filed an issue with some detail: aldanor/fast-float-rust#37 Doing a proper safety audit of that code will take much longer and is not really worth it for me, at least. |
I'm closing this issue because it is not actionable right now. When the Rust standard library provides a method to directly parse bytes into a float we can switch to that. |
Description
The Eisel-Lemire algorithm at the heart of the fast-float crate has been merged into std.
rust-lang/rust#86761
Does polars still need fast-float?
See aldanor/fast-float-rust#34
The text was updated successfully, but these errors were encountered: