Java 8 RFC 7189139: BigInteger's staticRandom field can be a source of bottlenecks

Aleksey Shipilev aleksey.shipilev at oracle.com
Mon Aug 26 12:19:18 UTC 2013


Hi Brian,

On 08/24/2013 03:39 AM, Brian Burkhalter wrote:
> file:///Users/bpb/Work/JSL/jdk/jdk8/tl8/jdk/7189139/index.html
> 
> would be appreciated.

I'm puzzled over this fix.

Isn't the scalability bottleneck being inherent to SecureRandom, because
it piggybacks on the system entropy pool, which is depleted every so
often? What good the thread-local instances of SR actually bring to us?

As discussed in the relevant threads in the original bug report, the
actual fix should be a very accurate replacement of SR with some other
faster and reliable RNG to avoid the inherent scalability bottlenecks.

> Rudimentary testing with JMH 
> (http://openjdk.java.net/projects/code-tools/jmh/) did not reveal any
> deleterious performance effects in single-threaded operation nor any
> obvious improvements in the dual threaded case but testing was done
> on on my aging Core 2 Duo notebook and is not likely representative
> of anything approaching real world conditions.

That further reinforces my belief this particular change is not really
required :)

-Aleksey.




More information about the core-libs-dev mailing list