Chromium Code Reviews
DescriptionAdd more complex mixing of random seed.
This changes the sequences generated by Random for a given seed,
since the internal state will not be the same as for the unmixed
seed.
It is consistent between VM and dart2js.
The provided integer seed is hashed as follows:
uint64 hash = 0;
while (seed > 0) {
hash = hash * 1037 + mix64((int64)seed);
seed >>= 64;
}
where mix64 mixes the bits of a 64-bit value.
The hash is used to initialize the random generator's internal state.
R=floitsch@google.com, iposva@google.com
Committed: https://code.google.com/p/dart/source/detail?r=32412
Patch Set 1 #
Total comments: 25
Patch Set 2 : Address comments. #
Messages
Total messages: 6 (0 generated)
|
|||||||||||||||||||||||||||||||||||||