RFR: 8259278: Optimize Vector API slice and unslice operations [v2]
Sandhya Viswanathan
sviswanathan at openjdk.java.net
Thu Jan 7 00:33:13 UTC 2021
On Wed, 6 Jan 2021 17:18:14 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Sandhya Viswanathan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use Objects.checkIndex and move code to xxxVector.java
>
> The following bounds check can be replaced with Objects.checkIndex:
> if ((origin < 0) || (origin >= VLENGTH)) {
> throw new ArrayIndexOutOfBoundsException("Index " + origin + " out of bounds for vector length " + VLENGTH);
> }
>
> In general, I am wondering why the code for the slice/unslice implementations cannot refer to template code of the abstract super class, thereby avoiding much duplication.
@PaulSandoz Thanks a lot for the review. I have implemented both the changes you suggested.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1950
More information about the hotspot-dev
mailing list