From cbedab7ddf0c0a9bae10719d9818ea734c6be836 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Wed, 23 Oct 2024 20:38:45 -0700 Subject: [PATCH] Fix #1351: Improved Javadocs for StreamWriteFeature.USE_FAST_DOUBLE_WRITER --- .../fasterxml/jackson/core/StreamWriteFeature.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/fasterxml/jackson/core/StreamWriteFeature.java b/src/main/java/com/fasterxml/jackson/core/StreamWriteFeature.java index a30c23ea9b..7a10fb21a7 100644 --- a/src/main/java/com/fasterxml/jackson/core/StreamWriteFeature.java +++ b/src/main/java/com/fasterxml/jackson/core/StreamWriteFeature.java @@ -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. *

- * 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. + *

+ * Feature is disabled by default, meaning that JDK default conversions are used. * * @since 2.14 */