On Mon, 3 Oct 2022 07:14:09 GMT, Ichiroh Takiguchi <itakigu...@openjdk.org> wrote:
> Test results are as follows on RHEL8.6 x86_64 (Intel Core i7 3520M) : > > ``` > 1.8.0_345-b01 > Benchmark Mode Cnt Score Error Units > MyBenchmark.testIBM1047 thrpt 25 53213.092 ± 126.962 ops/s > MyBenchmark.testIBM1047_SPI thrpt 25 47442.669 ± 349.003 ops/s > ``` > > ``` > 20-ea+17-1181 > Benchmark Mode Cnt Score Error Units > MyBenchmark.testIBM1047 thrpt 25 136331.141 ± 1078.481 ops/s > MyBenchmark.testIBM1047_SPI thrpt 25 51563.213 ± 843.238 ops/s > ``` > > IBM1047 is 2.6 times faster than the SPI version on JDK20. I think this > results are related to **JEP 254: Compact Strings** . As I requested before, > we'd like to use `sun.nio.cs.SingleByte*` and `sun.nio.cs.DoubleByte*` class > as public API. I don't think that is a workable option. Maybe you could do more performance analysis on the providers that are using the SPI to see if there are any secure primitives that would make sense to expose in java.nio.charset.spi? I'm hesitate to suggest adding base classes to java.nio.charset.spi but that may be something that could be exposed too. ------------- PR: https://git.openjdk.org/jdk/pull/9399