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
> This pull request optimizes Vector API slice and unslice operations.
> All the slice and unslice variants that take more than one argument are implemented in terms of already intrinsic methods on similar lines as slice(origin) and unslice(origin).
> Also, the slice and unslice intrinsics for 256-bit byte/short vectors implemented for x86 platforms supporting AVX2 using a sequence of instructions.
>
> For TestSlice.java attached to JBS (https://bugs.openjdk.java.net/browse/JDK-8259278):
> Before:
> Benchmark (size) Mode Cnt Score Error Units
> TestSlice.vectorSliceOrigin 1024 thrpt 5 17.665 ± 0.980 ops/ms
> TestSlice.vectorSliceOriginVector 1024 thrpt 5 604.179 ± 5.795 ops/ms
> TestSlice.vectorSliceUnsliceOrigin 1024 thrpt 5 9.286 ± 0.088 ops/ms
> TestSlice.vectorSliceUnsliceOriginVector 1024 thrpt 5 435.678 ± 30.171 ops/ms
> TestSlice.vectorSliceUnsliceOriginVectorPart 1024 thrpt 5 440.492 ± 24.592 ops/ms
>
> After:
> Benchmark (size) Mode Cnt Score Error Units
> TestSlice.vectorSliceOrigin 1024 thrpt 5 1319.044 ± 67.862 ops/ms
> TestSlice.vectorSliceOriginVector 1024 thrpt 5 969.514 ± 33.411 ops/ms
> TestSlice.vectorSliceUnsliceOrigin 1024 thrpt 5 687.804 ± 31.511 ops/ms
> TestSlice.vectorSliceUnsliceOriginVector 1024 thrpt 5 560.807 ± 20.600 ops/ms
> TestSlice.vectorSliceUnsliceOriginVectorPart 1024 thrpt 5 560.202 ± 4.012 ops/ms
>
> Please review.
>
> Best Regards,
> Sandhya
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
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/1950/files
- new: https://git.openjdk.java.net/jdk/pull/1950/files/1c2c6a4e..8fd967e1
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1950&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1950&range=00-01
Stats: 1401 lines in 38 files changed: 364 ins; 899 del; 138 mod
Patch: https://git.openjdk.java.net/jdk/pull/1950.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1950/head:pull/1950
PR: https://git.openjdk.java.net/jdk/pull/1950
More information about the hotspot-dev
mailing list