[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Octave and GSL interface
From: |
John W. Eaton |
Subject: |
Octave and GSL interface |
Date: |
Fri, 18 Jun 1999 14:35:52 -0500 (CDT) |
On 18-Jun-1999, Thomas Walter <address@hidden> wrote:
| Hello,
| Is anybody out there interested in acessing some functions from GSL
| too?
Sure, why don't you post your code to the octave-sources mailing list?
| I have encoded and tested an interface to the random number generator
| part of GSL. This part of GSL seems to be stable. The use of the GSL
| default RNG -- it has a period ~2^19937 -- is much faster than the RNG
| used in the fortran library with period ~2^31.
|
| example using octave-2.0.14 as is:
| tic;r=rand(100000,1);toc ==> ans = 0.84215
|
| examples using octave-2.0.14 as is and GSL
| tic;r=rng_rand(100000,1);toc ==> ans = 0.16287
The tic and toc functions are not the best way to measure
performance because they measure wall-clock time. Results can vary
dramatically if there are other processes running on the system.
It is generally much better to use the cputime function instead:
t = cputime ();
... code to measure ...
cputime - t
jwe
---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL. To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------