-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use csFastFloat instead of double.Parse #1745
Comments
That's quite impressive. I'm not sure I want to take on a dependency though. This would be a great thing to add to the contrib library. Someone could use a Out of curiosity, why not submit a pull request to .NET and speed up the native implementation? |
Thanks. It is already filed : dotnet/runtime#48646 |
I'll consider adding a converter for this in the contrib library. I don't have time at the moment, but I'll keep this open. I'm also watching the .NET framework issue you referenced. |
Let me know if I can be of any help ! |
@CarlVerret It looks like this is merged in the runtime and thus can be closed as resolved for .net 7 dotnet/runtime#62301 |
Awesome! |
Hi Josh!
As CSVHelper is one of the fastest library available, we thought that you'd be interested to get even faster!
We recently published csFastFloat, a fast and accurate float parser. It is almost 7 times faster than the standard library in some cases while providing exact results. It is a C# port of Daniel Lemire's fast_float originaly written in C++.
Our benchmark demonstrates that replacing double.Parse with FastDoubleParser results in a real peformance improvement. Results are shown in million of float parsed per second.
We parsed both single and multiple columns files using CSVHelper (with custom DefaultTypeConverter) :
csFastFloat is available as a NuGet package .
Benchmark repo can be found here
I'll be pleased to submit a Pull Request.
The text was updated successfully, but these errors were encountered: