class SplittableRandom

Doug Lea dl at cs.oswego.edu
Wed Jul 10 23:01:31 UTC 2013


On 07/10/13 16:49, Aleksey Shipilev wrote:
> (juggling an Occam's razor)

Thanks keep it sharp; the more skepticism the better.

>
> D'oh, of course it is ludicrously faster than j.u.Random. I am not convinced
> it beats TLR though, given TLR is super-optimized now in JDK 8. Are you
> really implying you can beat < 10 cycles? I will check that once I get back
> in office in about 12 hours.

Not "beats TLR". But "beats TLR in the context of parallel streams".
Which it currently does, in part because of the custom Stream
generator support (those ints(...), longs(...), doubles(...) methods)
that allow you to express things in a more efficient way.

As the primary author of TLR, and tied for the most performance-obsessed
person on this list, I'm reasonably aware of its strengths and weaknesses.
I'm convinced that SplittableRandom is the best shot we have of
addressing the weaknesses.

> Also, I am not convinced passing DieHarder on some split sequence (was it
> really the non-empty sequence?) extends to arbitrary splits.

It's been fully DieHarder-tested for each of the first few hundred splits.
The full tech-paper write-up is still being put together,
so at this point I can't link to tables etc, but I think you can
rely on your common sense that people putting together an algorithm
with this as its main contribution would actually test it :-)

-Doug







More information about the core-libs-dev mailing list