Removing a layer of synchronization on Math.random

Martin Buchholz martinrb at google.com
Tue Jun 8 06:51:33 UTC 2010


On Mon, Jun 7, 2010 at 19:46, David Holmes <David.Holmes at oracle.com> wrote:
> Martin,
>
> CR 6959259 filed.

Thanks.

>> Then I noticed that StrictMath.random duplicates
>> the code from Math.random, so I updated
>> StrictMath.random as well.  It would be more
>> maintainable to have StrictMath.random
>> simply call Math.random; I can do that,
>> but other StrictMath methods do no such delegation.
>
> I think that violates the current spec for each class as the RNG can not be
> shared.

Agreed.

Martin



More information about the core-libs-dev mailing list