-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8300493: Use ArraysSupport.vectorizedHashCode in j.u.zip.ZipCoder #12077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👋 Welcome back redestad! A progress list of the required criteria for merging this PR into |
Webrevs
|
Using countPositives, and vectorizedHashCode(T_BOOLEAN) for unsigned bytes, make sense here. I don't have time to study the micro right now. |
FWIW the micro is derived from the sibling |
I've no doubt it improves checkedHash, it's just that open the zip file and reading in the CEN probably dominates when not in the file system cache. |
@cl4es 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 80 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. ➡️ To integrate this PR with the above commit message to the |
zos.putNextEntry(new ZipEntry(ename)); | ||
|
||
ename += "long-entry-name-" + (random.nextInt(90000) + 10000) + "-" + i; | ||
zos.putNextEntry(new ZipEntry(ename)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth to add some random sized data when the entries are created to allow for getting a bit more insight, or perhaps do that in a separate benchmark>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was experimenting with varying the entry names length to see what - if any - impact it had and saw a small effect on the micro. It does make more sense to vary lengths now that very long names will take different paths in the vectorized intrinsic. I'll see what I can do without overengineering this.
Right, the micro is a poor proxy for real-world implications since time to open a zip file very much depends on the filesystem speed but this is sort of by design. We have separate startup tests that tries to emulate more "cold start" scenarios, which micros like this are complementary to and not a substitute for. |
…ntries short but making the longest paths longer
Updated micro to vary entry sizes more to ensure we exercise the different code paths through the Baseline:
Patched:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Claes
Thanks @LanceAndersen and @AlanBateman for reviewing! /integrate |
Going to push as commit bb42e61.
Your commit was automatically rebased without conflicts. |
ZipCoder::checkedHashCode
emulatesStringLatin1::hashCode
but operates on abyte[]
subrange. It can profitably use the recently introducedArraysSupport::vectorizedHashCode
method to see a speed-up, which translates to a small but significant speed-up onZipFile
creation.Before:
After:
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/12077/head:pull/12077
$ git checkout pull/12077
Update a local copy of the PR:
$ git checkout pull/12077
$ git pull https://git.openjdk.org/jdk pull/12077/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 12077
View PR using the GUI difftool:
$ git pr show -t 12077
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12077.diff