RFR: 8248188: Add IntrinsicCandidate and API for Base64 decoding [v8]

CoreyAshford github.com+51754783+coreyashford at openjdk.java.net
Sat Oct 24 21:41:36 UTC 2020


On Thu, 22 Oct 2020 20:40:00 GMT, CoreyAshford <github.com+51754783+CoreyAshford at openjdk.org> wrote:

>> Thanks for this question. I also stumbled over it when reviewing. I guess a branch which gets mispredicted in ~22% of the cases leads to a big performance loss. (In addition, the branch target is not aligned.)
>
> Yes, it assumes uniformly random data, but also recall that the unencoded data bytes get shifted by 2, 4, 6 bits into the encoded bytes, which I'm guessing would tend to make the data somewhat more uniform, even if the source data has low entropy.
> 
> That said, I didn't actually benchmark it.  I will do that to make sure there is a gain, and if there isn't I will remove the conditional branch.

> I took a look at the VSX algo. I haven't looked much beyond it. I had a few questions I've inlined. It does look like a faithful VSX implementation of the linked algo.

I neglected to thank you for reviewing this code!  I realize there's quite a time commitment required to review this properly, and because of that I was having difficulty finding a second reviewer for the PPC64 portion.

Just to set expectations, I will be on vacation next week, so further commits won't be posted until the following week, but I will address all of your great feedback.  Thanks again!

-------------

PR: https://git.openjdk.java.net/jdk/pull/293


More information about the core-libs-dev mailing list