RFR: 8284579: Improve VarHandle checks for interpreter [v4]
Claes Redestad
redestad at openjdk.java.net
Tue Apr 12 21:13:18 UTC 2022
> A few additional enhancements aiming to improve VH performance in the interpreter:
>
> - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase 40->48) but removes an object and an indirection on any instance actually used - and might avoid allocating the `MethodHandle[]` unnecessarily on some instances
> - Have `checkExactAccessMode` return the directness of the `VarHandle` so that we can avoid some `isDirect` method calls.
>
> Baseline, `-Xint`
>
> Benchmark Mode Cnt Score Error Units
> VarHandleExact.exact_exactInvocation avgt 30 478.324 ? 5.762 ns/op
> VarHandleExact.generic_exactInvocation avgt 30 392.114 ? 1.644 ns/op
> VarHandleExact.generic_genericInvocation avgt 30 822.484 ? 1.865 ns/op
>
>
> Patched, `-Xint`
>
> Benchmark Mode Cnt Score Error Units
> VarHandleExact.exact_exactInvocation avgt 30 437.704 ? 5.320 ns/op
> VarHandleExact.generic_exactInvocation avgt 30 374.512 ? 3.154 ns/op
> VarHandleExact.generic_genericInvocation avgt 30 757.054 ? 1.237 ns/op
>
>
> No significant performance difference in normal mode.
Claes Redestad has updated the pull request incrementally with two additional commits since the last revision:
- Improve javadoc for merged method
- Add javadoc for merged method
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/8160/files
- new: https://git.openjdk.java.net/jdk/pull/8160/files/2a4fbd6d..df1d652b
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8160&range=03
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8160&range=02-03
Stats: 10 lines in 1 file changed: 10 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/8160.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8160/head:pull/8160
PR: https://git.openjdk.java.net/jdk/pull/8160
More information about the core-libs-dev
mailing list