Skip to content
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

8277846: Implement fast-path for ASCII-compatible CharsetEncoders on ppc64 #6565

Conversation

TheRealMDoerr
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr commented Nov 25, 2021

PPC64 port of 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86
I moved the encode_iso_array implementation into C2_MacroAssembler and reused it for the new ASCII node. The algorithm is unchanged. We only need to change the mask because (non-extended) ASCII uses 7 bit (also see x86 implementation).

'micro:CharsetEncodeDecode' benchmark results without intrinsic on Power9:

Benchmark                   (size)       (type)  Mode  Cnt    Score   Error  Units
CharsetEncodeDecode.encode   16384        UTF-8  avgt   30   14.530 ± 0.012  us/op
CharsetEncodeDecode.encode   16384         BIG5  avgt   30   15.359 ± 0.014  us/op
CharsetEncodeDecode.encode   16384  ISO-8859-15  avgt   30   14.256 ± 0.019  us/op
CharsetEncodeDecode.encode   16384        ASCII  avgt   30   14.237 ± 0.012  us/op

With intrinsic:

Benchmark                   (size)       (type)  Mode  Cnt    Score   Error  Units
CharsetEncodeDecode.encode   16384        UTF-8  avgt   30    5.085 ± 0.016  us/op
CharsetEncodeDecode.encode   16384         BIG5  avgt   30    5.905 ± 0.023  us/op
CharsetEncodeDecode.encode   16384  ISO-8859-15  avgt   30    4.795 ± 0.023  us/op
CharsetEncodeDecode.encode   16384        ASCII  avgt   30    4.798 ± 0.013  us/op

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8277846: Implement fast-path for ASCII-compatible CharsetEncoders on ppc64

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6565/head:pull/6565
$ git checkout pull/6565

Update a local copy of the PR:
$ git checkout pull/6565
$ git pull https://git.openjdk.java.net/jdk pull/6565/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6565

View PR using the GUI difftool:
$ git pr show -t 6565

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6565.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 25, 2021

👋 Welcome back mdoerr! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 25, 2021
@openjdk
Copy link

openjdk bot commented Nov 25, 2021

@TheRealMDoerr The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Nov 25, 2021
@mlbridge
Copy link

mlbridge bot commented Nov 25, 2021

Webrevs

Copy link
Contributor

@RealLucy RealLucy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me.
Thank you for this optimisation. 3x in microbench justifies the effort, I assume.

@openjdk
Copy link

openjdk bot commented Nov 29, 2021

@TheRealMDoerr 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:

8277846: Implement fast-path for ASCII-compatible CharsetEncoders on ppc64

Reviewed-by: lucy, mbaesken

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 41 new commits pushed to the master branch:

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 29, 2021
@TheRealMDoerr
Copy link
Contributor Author

Thanks a lot for your reviews!

@TheRealMDoerr
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 30, 2021

Going to push as commit a5f2a58.
Since your change was applied there have been 50 commits pushed to the master branch:

  • ceae380: 8277843: [Vector API] scalar2vector generates incorrect type info for mask operations if Op_MaskAll is unavailable
  • 3ee26c6: 8267767: Redundant condition check in SafepointSynchronize::thread_not_running
  • d230fee: 8277931: Parallel: Remove unused PSVirtualSpace::expand_into
  • fde6fe7: 8277824: Remove empty RefProcSubPhasesWorkerTimeTracker destructor
  • 27299ea: 8277803: vmTestbase/nsk/jdi/TypeComponent/isSynthetic/issynthetic001 fails with "Synthetic fields not found"
  • 560f9c9: 8277426: Optimize mask reduction operations on x86
  • 3a4a94e: 8277854: The upper bound of GCCardSizeInBytes should be limited to 512 for 32-bit platforms
  • 825e633: 8277944: JDK 18 - update GA Release Date
  • 3d39f09: 8277654: Shenandoah: Don't produce new memory state in C2 LRB runtime call
  • 05ab176: 8277797: Remove undefined/unused SharedRuntime::trampoline_size()
  • ... and 40 more: https://git.openjdk.java.net/jdk/compare/cf7adae6333c7446048ef0364737927337631f63...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 30, 2021
@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 30, 2021
@TheRealMDoerr TheRealMDoerr deleted the 8277846_PPC64_CharsetEncoders branch November 30, 2021 09:21
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 30, 2021
@openjdk
Copy link

openjdk bot commented Nov 30, 2021

@TheRealMDoerr Pushed as commit a5f2a58.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
3 participants