[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] random returns the same number on x86_64 a
Re: [Chicken-hackers] [PATCH] random returns the same number on x86_64 all the time
Sun, 4 Mar 2012 18:33:30 +0100
On Sun, Mar 04, 2012 at 05:32:22PM +0100, Peter Bex wrote:
> Thanks, Jim; I used most-positive-fixnum here because I figured it should
> try to use as many bits as there are available; on 64 bit systems that
> may be 54 bits and on 32 bit systems that'll be 30 bits.
We had a talk on IRC and it seems to us that it's time to bring in
a better PRNG into Chicken core. In the meanwhile, hash tables
should use as much randomization as is available, which is simply
RAND_MAX, which means we can just use the result of rand() directly.
The attached patch makes this happen.
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
Description: Text document