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

ARROW-10328: [C++] Vendor fast_float number parsing library #8494

Closed
wants to merge 3 commits into from

Conversation

pitrou
Copy link
Member

@pitrou pitrou commented Oct 20, 2020

This library is 2x to 3x faster for parsing strings to binary floating-point numbers.

@pitrou
Copy link
Member Author

pitrou commented Oct 20, 2020

Before:

  • Parsing raw values:
FloatParsing<FloatType>          39763 ns        39758 ns        52350 items_per_second=25.152M/s
FloatParsing<DoubleType>         29812 ns        29808 ns        68765 items_per_second=33.5483M/s
  • CSV converter performance:
FloatConversion                 199539 ns       199508 ns         3498 items_per_second=40.0986M/s
  • Reading a CSV file of floating-point numbers (single-threaded):
276 MB (10000000 rows) in 1.481 s. => 187 MB/s.
276 MB (10000000 rows) in 1.441 s. => 192 MB/s.
276 MB (10000000 rows) in 1.417 s. => 195 MB/s.
276 MB (10000000 rows) in 1.418 s. => 195 MB/s.
276 MB (10000000 rows) in 1.430 s. => 193 MB/s.

@pitrou
Copy link
Member Author

pitrou commented Oct 20, 2020

After:

  • Parsing raw values:
FloatParsing<FloatType>          11936 ns        11934 ns       184367 items_per_second=83.7942M/s
FloatParsing<DoubleType>         10989 ns        10988 ns       194016 items_per_second=91.0101M/s
  • CSV converter performance:
FloatConversion                 108180 ns       108166 ns         6442 items_per_second=73.9605M/s
  • Reading a CSV file of floating-point numbers (single-threaded):
276 MB (10000000 rows) in 0.903 s. => 306 MB/s.
276 MB (10000000 rows) in 0.844 s. => 328 MB/s.
276 MB (10000000 rows) in 0.818 s. => 338 MB/s.
276 MB (10000000 rows) in 0.812 s. => 341 MB/s.
276 MB (10000000 rows) in 0.800 s. => 346 MB/s.

@github-actions
Copy link

@wesm
Copy link
Member

wesm commented Oct 20, 2020

Do we need to unvendor double-conversion?

@pitrou
Copy link
Member Author

pitrou commented Oct 20, 2020

No, we still use it for the other way round (float to string).

This library is 2x to 3x faster for parsing strings to binary floating-point numbers.
@pitrou pitrou marked this pull request as ready for review October 21, 2020 12:26
LICENSE.txt Show resolved Hide resolved
@pitrou pitrou requested a review from bkietz October 21, 2020 12:28
Copy link
Member

@bkietz bkietz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice speedup, I'll wait to merge until attribution has been resolved

@pitrou pitrou closed this in 16412a1 Oct 21, 2020
@pitrou pitrou deleted the ARROW-10328-fast-float branch October 21, 2020 16:43
GeorgeAp pushed a commit to sirensolutions/arrow that referenced this pull request Jun 7, 2021
This library is 2x to 3x faster for parsing strings to binary floating-point numbers.

Closes apache#8494 from pitrou/ARROW-10328-fast-float

Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants