JDK 8 RFC 7189139 version 2: BigInteger's staticRandom field can be a source of bottlenecks
Aleksey Shipilev
aleksey.shipilev at oracle.com
Fri Oct 4 07:18:57 UTC 2013
On 10/04/2013 03:34 AM, Brian Burkhalter wrote:
> Here is an alternative solution: http://cr.openjdk.java.net/~bpb/7189139.2/.
Seems OK with me, as long as Miller-Rabin test tolerates the
lower-entropy PRNG.
> If this seems reasonable, does anyone have suggestions as to testing?
I would like to see the functional tests.
We can take the list of prime numbers [1] as set P, and then check:
a) numbers in intersect([2;N), P) return isProbablyPrime=true in more
than >(1 - 1/2^cert) cases;
b) all numbers in difference([2;N), P) return isProbablyPrime=false
N > 50.000.000 would sound convincing.
-Aleksey.
[1] http://primes.utm.edu/lists/small/
More information about the core-libs-dev
mailing list