Some final arrays of BigInteger and BigDecimal are stable and immutable. We
should add `@Stable` to give the optimizer more information
-
Shaojin Wen
Some static final arrays of BigInteger and BigDecimal are stable and immutable.
We should add @Stable to give the optimizer more information
-
Shaojin Wen
Classes such as java.lang.CharacterDataXXX have multiple static final arrays,
which will not be modified. We should add @Stable to provide information to the
optimizer.
such as
```java
class CharacterData00 {
@Stable static final char[] X =
@Stable static final char[] Y =
@Stable static final int
Now Integer/Long uses Integer::digits to convert to byte, so we should define
Integer::digits as byte[], which can avoid the conversion.
-
Shaojin Wen
When debugging getLong/getDouble/getDecimal of java.text.DigitList, the
debugger will call the DigitList::toString method. At this time,
DigitList::toString will modify tempBuilder, which will cause incorrect results.
-
Shaojin Wen
Through JVM Option +PrintInlining, we found that String has a constructor
codeSize of 852, which is too large. This caused failed to inline.
The following is the output information of PrintInlining:
```
@ 9 java.lang.String:: (12 bytes) inline (hot)
!m @ 1 java.nio.charset.Charset::defaultCharset
As the author of a popular json library (fastjson/fastjson2), I think the
current design is not good, not easy to use, and the performance is not good.
The JsonNull/JsonNumber/JsonString/JsonValue here should not be designed like
this, which will cause trouble to users and affect performance.
For
Many libraries use Unsafe to improve performance, especially in many
performance-critical scenarios of big data, such as Apache Flink/Apache Arrow,
etc. Direct removal will make it difficult to adopt the new version of JDK.
It is recommended to use it similar to JEP 396, which needs to be opened