-
-
Notifications
You must be signed in to change notification settings - Fork 811
Enable Fast Floating-Point reading by default in 3.0 #1231
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
Comments
One thought on this change - as of Java 19, an implementation of the Schubfach algorithm is used in the JDK itself, and there have been more improvements since then. Perhaps keeping the default USE_FAST_DOUBLE_WRITER using the JDK should be considered. See https://bugs.openjdk.org/browse/JDK-4511638 |
@j3graham we did not change the write config for exactly the reason you describe. You can see the v3 code here and its javadoc. |
I will update description, good call out @j3graham , @pjfanning. |
Uh oh!
There was an error while loading. Please reload this page.
For Jackson 2.x we have following features disabled by default:
StreamReadFeature.USE_FAST_DOUBLE_PARSER
StreamReadFeature.USE_FAST_BIG_NUMBER_PARSER
StreamWriteFeature.USE_FAST_DOUBLE_WRITER
that is, for FP reading to use default JDK implementation and not one from FastDoubleParser (read) / Schubfach (write). This to minimize any chance of breakage, to require users to opt-in for optimized handling.
Since there hasn't been reports of issues during the time we've had (since 2.14, more than a year), it seems reasonable to assume things work well: so let's enable "fast FP" handling by default for 3.0.
We can still consider similar change for later 2.x, but let's start with 3.0.
EDIT: (2025-04-05)
Due to findings on lack of improvements for writing (equivalent or better code in JDK 21) for newer JDKs, default for
StreamWriteFeature.USE_FAST_DOUBLE_WRITER
will NOT be changed -- it remainsdisabled
. Users on JDK 17 can then enable it.The text was updated successfully, but these errors were encountered: