On Fri, 20 Jan 2023 18:21:59 GMT, Roger Riggs <rri...@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

Reply via email to