RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes [v2]
Per Minborg
pminborg at openjdk.org
Mon Jan 23 08:17:18 UTC 2023
On Fri, 20 Jan 2023 18:21:59 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Improve doc and fix typo
>
> src/java.base/share/classes/jdk/internal/util/access/ByteArrayAccess.java line 614:
>
>> 612: /*
>> 613: * Methods for packing primitive values into byte arrays starting at offset zero.
>> 614: */
>
> Is the only advantage to the zero offset versions in the API, shorter invocations with fewer parameters?
> Is there any performance difference?
Very good question. I will take a look at it. A fixed value is inserted in the original var handle so potentially it might improve performance that way too.
-------------
PR: https://git.openjdk.org/jdk/pull/12076
More information about the core-libs-dev
mailing list