RFR: 8300235: Use VarHandle access in Image(Input | Output)StreamImpl classes [v2]
Per Minborg
pminborg at openjdk.org
Thu Feb 2 15:05:00 UTC 2023
On Wed, 1 Feb 2023 15:13:27 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> This PR suggests improving performance by using the newly introduced class `jdk.internal.util.ByteArray` to improve packing/unpacking operations.
>>
>> The PR also proposes adding a `ByteArrayLittleEndian` class for support for little endian packing/unpacking.
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>
> Add benchmark
Here are some benchmarks:
Baseline (JDK21, master (called Java 20 below))
Benchmark Mode Cnt Score Error Units
ImageInputStreamBench.readInt avgt 15 1.289 ± 0.029 ns/op
ImageInputStreamBench.readLong avgt 15 1.308 ± 0.017 ns/op
Patch (called Java 21 below)
Benchmark Mode Cnt Score Error Units
ImageInputStreamBench.readInt avgt 15 0.946 ± 0.046 ns/op
ImageInputStreamBench.readLong avgt 15 0.954 ± 0.010 ns/op

-------------
PR: https://git.openjdk.org/jdk/pull/12204
More information about the core-libs-dev
mailing list