Here are the the benchmarks results from my machines using Francesco
Potorti's benchmark and the lsode example from the manual.
Sun SPARC Station 2:
test #1 0.74125 +/- 2.7% (10 runs)
test #2 3.99875 +/- 0.5% (10 runs)
test #3 8.8825 +/- 4.0% (10 runs)
test #1 0.161429 +/- 4.7% (10 runs)
test #2 0.844286 +/- 1.9% (10 runs)
test #3 1.69 +/- 0.0% (10 runs)
About what everyone expects.
However that still leaves me with my orginal problem which is why *my*
ODEs are so slow.
- does anyone else experience the same problem with the original
equations on linux?
- could it be a performance bug in a linux library?
- could it be a performance bug in #ifdef'ed octave code?
- what libraries is octave linked against?
- if other people don't have the orginal problem, what version of the
libraries are they using?
- have I done something wrong (my orginal theory)?
As it stands solving the systems I want to solve on the pentium is not a
practicle proposition. I suppose I could try to profile octave myself...
Thanks for the interest shown so far in my problem,
Department of Anatomy & Cell Biology
University of Melbourne
ph: 9344-5849 fax: 9344-5818
Benchmark for 486DX/Linux was: Slow Performance on Linux
This is a new version of the benchmark for octave. Improvements:
- This version of the benchmark introduces a version number (so one
knows if figures obtained are comparable).
- It writes the results using a Sun Sparc 2 as reference (it is the
slowest machine it has been run on until now).
- It should be possible to tun it also on machines where cputime()
does not work. A warning is printed at the beginning saying that
the results can only be accurate if no other process is running at
- I renamed it benchmark.m.
The original problem which this thread originated from is still
unresolved: why on th earth a particular lsode problem proposed by
Evan Thomas <[hidden email]> is much slower than
the other operations on Linux?
# This is a first attempt at a simple benchmark for octave.
# Francesco Potorti` <[hidden email]>
# Fri Mar 22 16:37:46 MET 1996
printf ("Octave benchmark version %g\n", bm_version);
clear bm_st bm_et
if (cputime() == 0)
# Use these function if cputime() does not work on this particular
# port of octave. In this case, time will be computed on a wall
# clock, and will make sense only on a machine where no other
# processes are consuming significant cpu time while the benchmark
# is running.
("WARNING: if other processes are running the figures will be inaccurate");
function t = bm_st ()
t = clock();
function et = bm_et (t);
et = etime(clock(),t);
function t = bm_st ()
t = cputime();
function et = bm_et (t)
et = cputime() - t;
# Used for the lsode test.
function xdot = xdot (x, t)
r = 0.25; k = 1.4; a = 1.5; b = 0.16; c = 0.9; d = 0.8;
xdot(1) = r*x(1)*(1 - x(1)/k) - a*x(1)*x(2)/(1 + b*x(1));
xdot(2) = c*a*x(1)*x(2)/(1 + b*x(1)) - d*x(2);
# Do benchmark
nf = 3; # Number of tests
sparc2 = [0.74, 4.0, 8.9]; # Sun Sparc 2 is the reference
function bm_time = test(f) # Actual test functions
global s0, t;
start = bm_st();
if (f == 1) inv(hadamard(7));
bm_time = bm_et(start);
printf ("Speed of octave %s on %s relative to a Sun Sparc 2\n", ...
for f = 1:nf
res = ;
test(f); # run a first test to increase the RSS, load things and so on
for rep = 1:maxrepetitions
res(rep) = sparc2(f) / test(f);
if (rep < minrepetitions)
# purged results: remove min and max elements
pres = res((res != max(res)) & (res != min(res)));
if (std(pres)/mean(pres) < targetaccuracy || toc() > maxseconds)
# print 95% confidence interval
printf("test #%d\t\t%4.2f +/- %.1f%% (%d runs)\n", ...
f, mean(pres), 200*std(pres)/mean(pres), rep);