Skip to content
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

chore: Move to fast-float2 #19578

Merged
merged 1 commit into from
Nov 1, 2024
Merged

chore: Move to fast-float2 #19578

merged 1 commit into from
Nov 1, 2024

Conversation

ritchie46
Copy link
Member

Also updated other packages.

closes #19541
closes #13035

@ritchie46 ritchie46 changed the title chore: Update to fast-float2 chore: Move to fast-float2 Nov 1, 2024
@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Nov 1, 2024
@ritchie46 ritchie46 merged commit 3d124c5 into main Nov 1, 2024
21 of 22 checks passed
@ritchie46 ritchie46 deleted the dev branch November 1, 2024 10:02
@ptiza
Copy link
Contributor

ptiza commented Nov 22, 2024

fyi, from_le_bytes() and from_be_bytes() for f64 and f32 will be stabilized with Rust 1.83: rust-lang/rust#130075

So we should be able to get rid of this dependency soon.

Edit: Actually, polars uses nightly, so we can already use this instead...

@ptiza
Copy link
Contributor

ptiza commented Nov 22, 2024

Sorry, I misunderstood the PR. We're actually trying to parse string bytes here, so from_le_bytes() does not help.

We would have to use something like

unsafe { String::from_utf8_unchecked(val.into()) }
    .parse()
    .ok()

which @orlp already mentioned in #13035

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

replace fast-float with fast-float2 Remove fast-float crate?
2 participants