RFR: 8316150: Refactor get chars and string size [v7]
Andriy Plokhotnyuk
duke at openjdk.org
Fri Sep 22 11:59:27 UTC 2023
On Fri, 22 Sep 2023 09:22:04 GMT, 温绍锦 <duke at openjdk.org> wrote:
>> 1. Reduce duplicate stringSize code
>> 2. Move java.lang.StringLatin1.getChars to jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other packages also need to use this method
>
> 温绍锦 has updated the pull request incrementally with one additional commit since the last revision:
>
> restore HexDigits & OctalDigits
src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 115:
> 113: }
> 114: return 10 + d;
> 115: }
@wenshao How about of using [this](https://github.com/plokhotnyuk/jsoniter-scala/blob/6b72cf75ad7f53e8a285d512009d164c3eabbb3a/jsoniter-scala-core/jvm/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core/JsonWriter.scala#L2367-L2369) trick to avoid multiplications in a loop?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15699#discussion_r1334280362
More information about the core-libs-dev
mailing list