Closed cowtowncoder closed 1 month ago
cc @pjfanning
The author of the Schubfach code seems to work on the JDK these days. https://github.com/c4f7fcce9cb06515/Schubfach/blob/master/todec/src/math/DoubleToDecimal.java
Raffaello Giulietti
In the end of the day, it is good that the JDK has good performance. We can suggest that users only use StreamWriteFeature.USE_FAST_DOUBLE_WRITER=true if they are using an older JDK.
Yes, absolutely good we need not override JDK handling. As long as we can be confident implementation has caught up which seems to be the case. Good learnings!
Updated Javadocs to indicate improvements up to JDK 17, but not 21 or above; closing the issue.
Something I found out when writing:
https://cowtowncoder.medium.com/jackson-2-18-fast-vector-reads-writes-6c2cf99c4594
is that while with JDKs 8 and 17 optimized floating-point writes (with
StreamWriteFeature.USE_FAST_DOUBLE_WRITER
) is about 2x as fast as JDK one, with JDK 21, JDK version is now slightly faster.Code Jackson uses is from https://github.com/c4f7fcce9cb06515/Schubfach (as per notes on 3 classes in
com.fasterxml.jackson.core.io.schubfach
).So it'd be good to consider what to do, if anything: