RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v18]
温绍锦
duke at openjdk.org
Tue Sep 12 13:27:53 UTC 2023
On Tue, 12 Sep 2023 10:11:53 GMT, Claes Redestad <redestad at openjdk.org> wrote:
> Running some additional testing. This mostly looks fine.
>
> One issue is that you're swapping the byte-order in `DecimalDigits::DIGITS` but not in `OctalDigits` and `HexDigits`. I think we need to keep these internally consistent to avoid surprises.
>
> I also would like to see performance numbers of the byte order swap evaluated in isolation. I suspect the real effect is small and might be due to JIT noise rather than a real effect, and that this swap got rushed in without solid evidence that it helps.
>
> If there's no significant performance difference I would prefer if we kept `DecimalDigits::DIGITS` big-endian encoded - which is more intuitive to most - and adjust code depending on `DecimalDigits::digitPair` to use `ByteArray` rather than `ByteArrayLittleEndian`.
I prefer to use little endian, most environments are little endian. Changes to HexDigit will have to wait until #PR 14745 is merged.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15651#issuecomment-1715721750
More information about the core-libs-dev
mailing list