8316587: Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl#15837
8316587: Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl#15837liach wants to merge 2 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back liach! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
I can verify the improvement locally in your added micro: I don't have domain expertise w.r.t the classfile API to value how much this will benefit typical use-cases, but it seem like a straightforward enough improvement to me. (At least the |
|
|
||
| if (!foundHigh) { | ||
| int singleBytes = JLA.countPositives(rawBytes, offset, rawLen); | ||
| int hash = ArraysSupport.vectorizedHashCode(rawBytes, offset, singleBytes, 0, ArraysSupport.T_BOOLEAN); |
There was a problem hiding this comment.
We should keep in mind that this code is on lambdas bootstrap critical path.
Any foreign code may involve lambdas or method references and cause dead end in lambdas initialization after JDK-8294960.
There was a problem hiding this comment.
This is safe: these two functions are already used in String itself (see StringLatin1) which is definitely loaded and initialized before Classfile API and its implementations are.
There was a problem hiding this comment.
Agreed w.r.t bootstrap safety: countPositives and vectorizedHashCode are straightforward java routines used by String and others very early in the bootstrap sequence. The speed-up they bring come from being intrinsified by the JIT.
|
@liach This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 47 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@asotona, @cl4es) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
/integrate |
|
@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
Can anyone sponsor this patch? This should be compatible with Class-File transition to preview as this does not change any API. |
|
/sponsor |
|
Going to push as commit 4812cab.
Your commit was automatically rebased without conflicts. |
Like #12077, this uses JDK's internal utilities to speed up ASCII reading in Class files, where most identifiers, from conventions to attribute names, are ASCII. See the JBS issue for more in-depth explanations.
Before: (Master)
After: (This patch, first revision)
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15837/head:pull/15837$ git checkout pull/15837Update a local copy of the PR:
$ git checkout pull/15837$ git pull https://git.openjdk.org/jdk.git pull/15837/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 15837View PR using the GUI difftool:
$ git pr show -t 15837Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15837.diff
Webrev
Link to Webrev Comment