Details
-
Bug
-
Resolution: Fixed
-
P3
-
8
-
b113
-
generic
-
generic
Description
This is a SUNBUG for https://bugs.openjdk.java.net/show_bug.cgi?id=100218
See also these references:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-January/009176.html
http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-January/008880.html
Description
Created an attachment (id=251) [details]
hg diff -g of BigInteger.java
The static field 'staticRandom' in BigInteger can be a source of bottlenecks
for concurrent code. This can be seen by calling isProbablePrime from several
threads running in parallel and noting that there is no appreciable speedup
over running linearly.
The proposed fix is change the static volatile staticRandom field to a
ThreadLocal. This will allow each thread to hold their own copy of staticRandom
and not have to wait for other threads when trying to access it.
See also these references:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-January/009176.html
http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-January/008880.html
Description
Created an attachment (id=251) [details]
hg diff -g of BigInteger.java
The static field 'staticRandom' in BigInteger can be a source of bottlenecks
for concurrent code. This can be seen by calling isProbablePrime from several
threads running in parallel and noting that there is no appreciable speedup
over running linearly.
The proposed fix is change the static volatile staticRandom field to a
ThreadLocal. This will allow each thread to hold their own copy of staticRandom
and not have to wait for other threads when trying to access it.
Attachments
Issue Links
- relates to
-
JDK-8026236 Add PrimeTest for BigInteger
- Closed