Skip to content

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 pitrou force-pushed the ARROW-10328-fast-float branch from 077bec5 to b493d7d Compare October 20, 2020 14:35
@pitrou
Copy link
Member Author

pitrou commented Oct 20, 2020

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

@pitrou pitrou force-pushed the ARROW-10328-fast-float branch from b493d7d to 077869d Compare October 20, 2020 18:41
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
@pitrou pitrou force-pushed the ARROW-10328-fast-float branch from 077869d to 244d7af Compare October 21, 2020 12:26
@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

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