On Mon, Jun 15, 2009 at 9:39 AM, <[email protected]> wrote: > I know nothing of the implementation though, I would have gone with > mersenne twister since it is what everyone else uses (python, ruby, etc)
I think it might make sense to take another look at Mersenne twister. It carries much more state around, but it has a higher period than the MWC implementation, and I agree that it might be nice to use what the others are using. > http://codereview.chromium.org/126113/diff/39/48#newcode145 > Line 145: static uint32_t lo = 0; > why not just static uint32_t hi = random() ? I'm slightly worried that random() might return zero, which will lead us to returning zero for all future invocations too (because of the multiplication). I've updated the comment to reflect this. Thanks for spotting this. Cheers, Kasper --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
