8300493: Use ArraysSupport.vectorizedHashCode in j.u.zip.ZipCoder#12077
8300493: Use ArraysSupport.vectorizedHashCode in j.u.zip.ZipCoder#12077cl4es wants to merge 2 commits intoopenjdk:masterfrom
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.
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.
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: |
|
Thanks @LanceAndersen and @AlanBateman for reviewing! /integrate |
|
Going to push as commit bb42e61.
Your commit was automatically rebased without conflicts. |
ZipCoder::checkedHashCodeemulatesStringLatin1::hashCodebut operates on abyte[]subrange. It can profitably use the recently introducedArraysSupport::vectorizedHashCodemethod to see a speed-up, which translates to a small but significant speed-up onZipFilecreation.Before:
After:
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/12077/head:pull/12077$ git checkout pull/12077Update a local copy of the PR:
$ git checkout pull/12077$ git pull https://git.openjdk.org/jdk pull/12077/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 12077View PR using the GUI difftool:
$ git pr show -t 12077Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12077.diff