RANDOM() and RANDOM(FALSE) problem



I haven't looked at the jmt code, but my belief is that if
it uses 32-bit unsigned quantitities, these will most likely be treated
as bignums  (not immediate fixnums) by Allegro CL, at least in
most 32-bit implementations of Allegro.
Using 29 bits would probably run faster.

RJF

Robert Dodier wrote:

> --- Raymond Toy  wrote:
> 
> 
>>As I said, the main part of CMUCL's generator is very portable.
>>Converting to floating point should be easy.
> 
> 
> OK, I have modified the CMUCL MT rng (rand-mt19937.lisp) so
> Clisp and GCL are happy with it. 
> 
> The up side is that the modified mt19937 is substantially
> faster (2 or maybe 3 times) than the naive MT 
> (http://www.lisp-p.org/jmt) which we discussed briefly. 
> 
> The down side is that it's substantially slower than the
> unmodified mt19937. I cut out calls to the CMUCL vm stuff, 
> which include a central calculation coded in x86 assembler.
> I assumed that's not portable, maybe I'm wrong about that.
> 
> The other down side is that the modified version is integer-only.
> I think it would be straightforward to restore the floating
> point stuff, though.
> 
> See: http://maxima.sf.net/wiki/index.php/Modified%20MT%2019937%20rng
> 
> 
>>In cl-bench, there is also a portable version of the mrgk3a
>>generator.  I think that's pretty well-respected too.  It requires
>>fast floating-point though.  One advantage is that the state is
>>fairly small, unlike the 600+ words for mt-19937.
>>
>>I do know that someone ran cmucl's generator through Marsaglia's
>>die-hard tests and the Ising physical model test, and it passed them
>>all.  Don't know about mrgk3a.
> 
> 
> I haven't looked into that yet, but it sounds interesting.
> 
> For what it's worth,
> Robert Dodier
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> The all-new My Yahoo! - What will yours do?
> http://my.yahoo.com 
> 
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima