RFR: 8366224: Introduce DecimalDigits.appendPair for efficient two-digit formatting and refactor DateTimeHelper [v24]

Shaojin Wen swen at openjdk.org
Tue Nov 18 00:55:17 UTC 2025


On Mon, 17 Nov 2025 14:41:04 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> > The `DecimalDigits.appendPair` and `appendQuad` methods will experience performance degradation if a `StringBuilder` with `Encoding UTF16` is passed to them. This occurs when `DecimalDigits.appendPair` or `appendQuad` is used in `DateTimeFormatter::formatTo`.
> 
> Adding single purpose functions to Java Lang Access is not worth the added complexity and maintenance cost.

Okay, most scenarios are Latin1, so we'll use the current version and not add any JLA bridging methods.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26911#issuecomment-3544563863


More information about the core-libs-dev mailing list