RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]
Rémi Forax
forax at openjdk.org
Tue Jan 17 09:15:23 UTC 2023
On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> Currently, `java.io.Bits` is using explicit logic to read/write various primitive types to/from byte arrays. Switching to the use of `VarHandle` access would provide better performance and less code.
>>
>> Also, using a standard API for these conversions means future `VarHandle` improvements will benefit `Bits` too.
>>
>> Improvements in `Bits` will propagate to `ObjectInputStream`, `ObjectOutputStream` and `RandomAccessFile`.
>>
>> Initial benchmarks and performance discussions can be found here: https://github.com/openjdk/panama-foreign/pull/762
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove faulty test tag, improve other test tag, fix comments
yes,
see https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/lang/invoke/MethodHandle.html#sigpoly
and https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/lang/invoke/VarHandle.html
-------------
PR: https://git.openjdk.org/jdk/pull/11840
More information about the core-libs-dev
mailing list