Files
java-core-examples/random/output/06-timings.txt
T

16 lines
567 B
Plaintext

cores available: 2
== One thread: nanoseconds per nextInt(), 20000000 calls ==
Random 8.5 ns/op
SplittableRandom 0.7 ns/op
ThreadLocalRandom 2.1 ns/op
L32X64MixRandom (default) 2.9 ns/op
Xoshiro256PlusPlus 2.7 ns/op
SecureRandom 90.6 ns/op
== 4 threads sharing ONE instance, 5000000 calls each (wall time, ms) ==
Random (shared) 987 ms
SecureRandom (shared) 7329 ms
ThreadLocalRandom.current() 37 ms
checksum (ignore): -28432667108051