This issue is a redo issue after 8342650 was rolled back.
Move getChars methods of StringLatin1 and StringUTF16 to DecimalDigits to reduce duplication
HexDigits and OctalDigits also include getCharsLatin1 and getCharsUTF16
Putting these two methods into DecimalDigits can avoid the need to expose them in JavaLangAccess
Eliminate duplicate code in BigDecimal
This PR will improve the performance of Integer/Long.toString and StringBuilder.append(int/long) scenarios. This is because Unsafe.putByte is used to eliminate array bounds checks, and of course this elimination is safe.
In previous versions, in Integer/Long.toString and StringBuilder.append(int/long) scenarios, -COMPACT_STRING performed better than +COMPACT_STRING. This is because StringUTF16.getChars uses StringUTF16.putChar, which is similar to Unsafe.putChar, and there is no bounds check.
Move getChars methods of StringLatin1 and StringUTF16 to DecimalDigits to reduce duplication
HexDigits and OctalDigits also include getCharsLatin1 and getCharsUTF16
Putting these two methods into DecimalDigits can avoid the need to expose them in JavaLangAccess
Eliminate duplicate code in BigDecimal
This PR will improve the performance of Integer/Long.toString and StringBuilder.append(int/long) scenarios. This is because Unsafe.putByte is used to eliminate array bounds checks, and of course this elimination is safe.
In previous versions, in Integer/Long.toString and StringBuilder.append(int/long) scenarios, -COMPACT_STRING performed better than +COMPACT_STRING. This is because StringUTF16.getChars uses StringUTF16.putChar, which is similar to Unsafe.putChar, and there is no bounds check.
- causes
-
JDK-8349241 Fix the concurrent execution JVM crash of StringBuilder::append(int/long)
-
- Open
-
- relates to
-
JDK-8342650 Move getChars to DecimalDigits
-
- Closed
-
- links to
-
Commit(master) openjdk/jdk/f446cefe
-
Review(master) openjdk/jdk/22023