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

Shaojin Wen swen at openjdk.org
Mon Sep 15 02:27:18 UTC 2025


On Sat, 23 Aug 2025 10:23:15 GMT, Shaojin Wen <swen at openjdk.org> wrote:

> localDateTimeToString

@j3graham 

    public static void appendPair(StringBuilder buf, int v) {
        int packed = DIGITS[v & 0x7f];
        buf.append((char) (packed & 0xFF))
           .append((char) (packed >> 8));
    }

I have tested this implementation and the performance is not good

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

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


More information about the security-dev mailing list