Skip to content

Commit

Permalink
Fix #1351: Improved Javadocs for StreamWriteFeature.USE_FAST_DOUBLE_W…
Browse files Browse the repository at this point in the history
…RITER
  • Loading branch information
cowtowncoder committed Oct 24, 2024
1 parent 686dd45 commit cbedab7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main/java/com/fasterxml/jackson/core/StreamWriteFeature.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,17 @@ public enum StreamWriteFeature

/**
* Feature that determines whether to use standard Java code to write floats/doubles
* (default) or use the Schubfach algorithm which is faster.
* The latter approach may lead to small differences in the precision of the
* float/double that is written to the JSON output.
* (default) or use the Schubfach algorithm which may be faster (but see the next
* paragraph for details).
* Schubfach algorithm output may have small differences in the precision of the
* float/double that compared to JDK default processing.
*<p>
* Feature is disabled by default, meaning that slower JDK default conversions are used.
* NOTE! Enabling this feature appears to improve performance significantly
* up to and including JDK 17, but NOT when using JDK 21
* and above -- in fact, it seems that JDK implementation is slightly faster.
* Because of this,enabling this feature is only recommended for JDKs 17 and below.
*<p>
* Feature is disabled by default, meaning that JDK default conversions are used.
*
* @since 2.14
*/
Expand Down

0 comments on commit cbedab7

Please sign in to comment.