help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mersenne Twister rand in octave forge


From: cctsim
Subject: Re: Mersenne Twister rand in octave forge
Date: Sun, 4 Jan 2004 20:53:42 +0000 (GMT)

On Sunday 04 January 2004 19:56, Dirk Eddelbuettel wrote:
> On Sun, Jan 04, 2004 at 06:54:09PM +0000, cctsim wrote:
> > While investigating the speed of different random number
> > generators I found that the rand function provided by
> > octave forge is slower than randmt found in
> >
> > http://dirk.eddelbuettel.com/code/octave-mt.html
> >
> > I used the test provided by compare_rngs.m found in
> > http://dirk.eddelbuettel.com/code/octave-mt/compare_rngs.m.txt
> >
> > The confusing bit is a note on the top of the above page that states:
> > "Note that this has been integrated, in a more polished rewrite by
Paul
> > Kienzle, into Octave-Forge."
>
> Exactly, see the file FIXES/rand.cc in the octave-forge distribution.
This
> file contains Paul Kienzle's very nice wrapping this Mersenne Twister
> generator into the same same calling interface as the original rand()
> function by John Eaton.
>
> Dirk

However, the wrapping interface results (probably) in speed loss
compared to randmt.cc . In my system "compare_rngs.m" compares 

>> which randn
randn is the dynamically-linked function from the file
/usr/local/octave/2.1.50/libexec/octave/2.1.50/site/oct/i686-fedora-linux-gnu/octave-forge/randn.oct

against 

>> which randmtn
randmtn is the dynamically-linked function from the file
/home/cctsim/randmtn.oct


Regards
cctsim





________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]