RFR(L): 8069539: RSA acceleration

Andrew Haley aph at redhat.com
Thu May 14 10:59:40 UTC 2015


On 05/13/2015 08:29 PM, Viswanathan, Sandhya wrote:
> 
> Thanks for your clarification. There are now two proposals/patches
> for this and we could benefit from both.

Yes, indeed.

> The patch that I proposed has intrinsic implementation for
> squareToLen which would still be exercised from the
> BigInteger.multiply() path when two inputs are same. It shows ~2x
> benefit for micro benchmark doing square operations and we see ~1.5x
> for Crypto RSA.
> 
> So in my thoughts we should go ahead with the patch from Intel as it
> is complementary to your proposal where you accelerate oddModPow.

I think that's probably right.  We can track the proposals separately.
Even if squareToLen and multiplyToLen don't end up being used in RSA
at all they will still be useful for BigInteger operations.

I'm not seriously suggesting the JNI route: it's just a demonstration
of how powerful the accelerated Montgomery algorithm is.  (Or,
alternatively, just how suboptimal our current approach is.)

Andrew.


More information about the hotspot-compiler-dev mailing list