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:57:37 UTC 2013


On 10/04/2013 11:18 AM, Aleksey Shipilev wrote:
> 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

Wait, this is one is wrong (too general). I meant to say all numbers in
[2;N) that return isProbablyPrime=false are not in P.

> N > 50.000.000 would sound convincing.

I need this list for another reason, so I had preprocessed the first 50M
primes here:
  http://cr.openjdk.java.net/~shade/scratch/primes-50M.txt.xz

-Aleksey.




More information about the core-libs-dev mailing list