On Mar 12, 2014, at 2:08 AM, Peter Levart wrote:

> Huh! This is a ThreadLocalRandom anti-pattern. Thou should not use a 
> ThreadLocalRandom instance in a thread that did not obtain it via a call to 
> ThreadLocalRandom.current()…

Good point.

> You could create a new BigInteger(512, rnd) in the static initializer and use 
> it to create new BigDecima(bigInteger) in testFirstToStrin.

I simply replaced ThreadLocalRandom with Random which probably creates a 
bottleneck but there is no significant difference in the results.

http://cr.openjdk.java.net/~bpb/6375303/Bench6375303.java
http://cr.openjdk.java.net/~bpb/6375303/6375303-bench.html

Thanks,

Brian

Reply via email to