RFR(M): 8145913: PPC64: add Montgomery multiply intrinsic

Doerr, Martin martin.doerr at sap.com
Mon Dec 28 17:45:16 UTC 2015


Hi Andrew,

thanks for reviewing.

I had only used SPECjvm2008 crypto.rsa to measure performance. The new implementation with the intrinsic is much faster (observed up to more than 3x the performance).

However, this benchmark does not show any difference when changing MONTGOMERY_SQUARING_THRESHOLD.
Can you propose something else for tuning this?

Best regards,
  Martin


-----Original Message-----
From: Andrew Haley [mailto:aph at redhat.com] 
Sent: Mittwoch, 23. Dezember 2015 18:43
To: Doerr, Martin <martin.doerr at sap.com>; hotspot-compiler-dev at openjdk.java.net
Subject: Re: RFR(M): 8145913: PPC64: add Montgomery multiply intrinsic

Hi,

On 23/12/15 15:42, Doerr, Martin wrote:

> I've ported the Montgomery multiplication from x86.
> 
> The webrev is here:
> http://cr.openjdk.java.net/~mdoerr/8145913_ppc_montgomery/webrev.00/
> 
> It only touches PPC64 files. It also contains some early feedback from Götz and some additional PPC64 cleanup.
> 
> Please review.

Looks good.

This needs work:

+// The threshold at which squaring is advantageous was determined
+// experimentally on an i7-3930K (Ivy Bridge) CPU @ 3.5GHz.
+#define MONTGOMERY_SQUARING_THRESHOLD 64

I'm sure it won't take long to find an appropriate threshold for
the CPU you most care about.  Hey, 64 might be best for you too,
but at least you get to insert the name of a PowerPC in that
comment.

Andrew.



More information about the hotspot-compiler-dev mailing list