-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Performance: Enable fast parsing/writing for double #7822
Comments
@mgodwan What are the tradeoffs here? Seems like the fast parser/writer is indeed faster, so are there any downsides to enabling it? |
I tested this with nyc_taxis benchmark which contains some GeoPoint data which is parsed using Double/Float parser. Server Setup : 1 node r5.2xlarge OS 2.5, 32G Heap I found the following results when comparing the runs with and without fast double parser enabled.
|
@andrross Jackson uses FastDoubleParser which is a Java port of fast_float cpp library. I believe this kind of input should should be very rare for us as well |
Is your feature request related to a problem? Please describe.
The default behaviour of jackson is to use JDK provided Double#parseDouble methods to convert string to double data types. Jackson also provides a fast parser for string to double conversion which can be leveraged to speed up the parsing process.
We should explore enabling the same and see if it may be beneficial to us in general, esp. for cases where we may deal with a lot of double data types such as vectors.
Describe the solution you'd like
USE_FAST_DOUBLE_PARSER
andUSE_FAST_DOUBLE_WRITER
Additional context
I ran a quick micro-benchmark after enabling the features for JsonParser in Jackson which yielded the following results:
Setup: MacBook Pro (13-inch, M1, 2020), 16G RAM
Doubles in range 0.0 - 1.0
Doubles in range -1E9 to +1E9
The text was updated successfully, but these errors were encountered: