RFR(L): 8069539: RSA acceleration
Viswanathan, Sandhya
sandhya.viswanathan at intel.com
Wed May 13 19:29:20 UTC 2015
Thanks for your clarification. There are now two proposals/patches for this and we could benefit from both.
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.
Best Regards,
Sandhya
-----Original Message-----
From: Andrew Haley [mailto:aph at redhat.com]
Sent: Wednesday, May 13, 2015 1:34 AM
To: Viswanathan, Sandhya; Vladimir Kozlov; Florian Weimer; hotspot-compiler-dev at openjdk.java.net
Subject: Re: RFR(L): 8069539: RSA acceleration
On 13/05/15 00:25, Viswanathan, Sandhya wrote:
> I was wondering if inline assembly can be used in the native code of JRE. Does the JRE build framework support it?
For every target which supports it you could define a macro in one of
the os/cpu-dependent header files. But it's slightly awkward because
it's compiler- as well as cpu-dependent. As long as we assume GCC
it's pretty easy for all targets but I'm not sure what other compilers
we use.
However, I have to stress that this is just a demonstration: even
though it is already much better than what we have, I'm not imagining
that we really want to use JNI for this. It would make more sense to
move it into HotSpot and call it as a runtime helper.
One interesting thing to try would be to find out if this technique
makes things slower on 32-bit targets. If it doesn't then we could
use it everywhere.
Andrew.
More information about the hotspot-compiler-dev
mailing list