octave-maintainers
[Top][All Lists]
Advanced

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

Re: randn benchmarks


From: Dirk Eddelbuettel
Subject: Re: randn benchmarks
Date: Fri, 23 Jan 2004 23:07:29 -0600
User-agent: Mutt/1.3.28i

Dmitri,

On Fri, Jan 23, 2004 at 03:33:29PM -0700, Dmitri A. Sergatskov wrote:
> Dirk and Paul,
> 
> While we at it. Could someone explain it to me why Dirk's randmt is few 
> times
> faster than the randn from octave-forge?

Not entirely sure, but if I recall, I wrapped Octave's C++ somewhat directly
into Shawn Cokus' C implementation, whereas Paul, thorough as he is, had
that wrapped into another C++ layer (written by someone else). That may
contribute to it.  But I may well be of base here...

Dirk



> 
> 
> octave:2> tic ; randmt(1000); toc
> ans = 0.055763
> octave:3> tic ; randmt(3000); toc
> ans = 0.77237
> octave:4> tic ; randmt(10000); toc
> ans = 26.469
> octave:5> tic ; randn(1000); toc
> ans = 0.31140
> octave:6> tic ; randn(3000); toc
> ans = 2.7659
> octave:7> tic ; randn(10000); toc
> ans = 30.786
> ((( It does seem that times converge for very large arrays...)))
> octave:8> which randn
> randn is the dynamically-linked function from the file
> /usr/local/libexec/octave/2.1.50/site/oct/i686-pc-linux-gnu/octave-forge/randn.oct
> 
> 
> Sincerely,
> 
> Dmitri.
> 

-- 
The relationship between the computed price and reality is as yet unknown.  
                                             -- From the pac(8) manual page



reply via email to

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