RFR: 8282874: Bad performance on gather/scatter API caused by different IntSpecies of indexMap
Joshua Zhu
jzhu at openjdk.java.net
Fri Mar 11 08:48:40 UTC 2022
On Wed, 9 Mar 2022 12:33:49 GMT, Joshua Zhu <jzhu at openjdk.org> wrote:
> I came across a performance issue when using scatter store VectorAPI for Integer and Long in the same application. The poor performance was caused by vector intrinsic inlining failure because of non-determined IntSpecies for a constant VectorShape of IndexMap in this scenario.
> As discussion at https://github.com/openjdk/jdk/pull/7721 , I change the code in VectorAPI.
> Please help review.
As my description at the beginning of both PRs, using gather/scatter VectorAPI for Integer and Long in the same application, this issue could be reproduced easily.
Check a simple reproducer at http://cr.openjdk.java.net/~jzhu/8282874/CheckAssembly.java. We can verify its performance via execution time.
This change fixes the non-determined IntSpecies for a constant VectorShape of IndexMap in this scenario.
But even with this fix, the performance still cannot reach optimum.
As mentioned before in this PR, besides this fix, there exists another issue that will also affect the performance since delay vector inlining.
The 2nd issue can be skirted around by disabling delay vector inlining manually.
I made an initial triage for the 2nd issue.
I had thought that force gvn by IncrementalInlineForceCleanup should help solve it. But ConstraintCastNode's StrongDependency made its own identity() lose effect.
That's why I propose to add a benchmark after we figure out the solution to 2nd issue. I agree with Paul that we could follow up with more tests afterward.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7757
More information about the hotspot-dev
mailing list