help-octave
[Top][All Lists]
Advanced

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

benchmark 1.5


From: Francesco Potorti`
Subject: benchmark 1.5
Date: Wed, 10 Apr 96 11:08 MET

I have had problems with my ftp server, which should be solved by now.
Anyway, I decided to post benchmark 1.5 to the list, contrary to my
previous statements ;).

This is version 1.5 of the benchmark.  The tests have not changed
since version 1.2, but the reference times have.  This means that the
reference times computed for your machine and put in the bm_mytime
array should stay the same, while the printed out values will be
different from the output of the other versions.

The reference values are those of a Sun Sparc 10/40 for octave version
1.1.1 and of a Sun Sparc 10/50 for version ss-960623.  Previous
versions of benchmark didn't make this distinction, that's why the
tables I sent to the list previously are inaccurate for some machines.

Here are new, hopefully correct, result tables for different
machines.  If you run benchmark on your machine, please send the
output to me, so I can grow the table.

Octave benchmark bm 1.5
                                 inv   schur lsode fft2  for   index
octave-1.1.1
[11] Linux/486dx-33              0.22  0.18  0.49  0.18  0.44   0.28
[5]  Linux/486dx2-50             0.67  0.26  0.60  0.26  0.56   0.43
[2]  Sun Sparc 2                 0.40  0.41  0.49  0.51  0.38   0.43
[9]  Linux/486dx2-66             0.37  0.33  0.72  0.32  0.64   0.45
[8]  Sun Sparc 10/super20        0.90  0.87  0.84  0.85  0.82   0.86
[8]  Sun Sparc 10/super30        0.99  0.95  0.90  0.99  0.89   0.94
[9]  Sun Sparc 10/super30        0.98  0.96  0.96  0.92  0.93   0.95
[8]  Sun Sparc 10/super51        0.69  0.87  1.07  1.13  1.18   0.97
[8]  Sun Sparc 10/super40        1.00  1.00  1.00  1.00  1.00   1.0
[8]  Sun Sparc 10/super41        1.08  1.13  1.07  1.00  1.02   1.1
[8]  Sun Sparc 20/super50        1.38  1.36  1.28  1.27  1.27   1.3
[6]  Linux/Pentium 90            1.23  1.23  1.91  0.87  1.71   1.3
[9]  Sun Sparc 20                1.51  1.49  1.27  1.41  1.33   1.4
[5]  Linux/Pentium 100           1.48  1.30  1.84  0.91  1.76   1.4
[7]  Irix 5.3/R8000 75/90        1.76  1.27  1.81  1.78  1.53   1.6
[8]  Sun Sparc 20/super61        1.82  1.75  1.61  1.71  1.56   1.7
[8]  Sun Ultra 1                 1.90  2.19  1.85  1.81  1.53   1.8
[8]  Sun Sparc 20/hyper 125MHz   1.83  2.76  1.79  1.97  1.78   2.0
[4]  IBM RS6000/590              4.28  4.62  1.27  3.83  0.91   2.5
[1]  DEC Alpha 2100              3.67  3.47  2.66  3.48  2.38   3.1

octave ss-960323
[10] Sun Sparc 10/50             1.00  1.00  1.00  1.00  1.00   1.0
[10] Sun UltraSparc 167          3.55  3.70  2.54  3.13  2.44   3.0
[10] DEC Alpha 400               3.51  6.53  1.74  4.26  1.50   3.0

[1] Francesco Potorti` <address@hidden>
[2] Evan Thomas <address@hidden>
[3] Jarle Brinchmann <address@hidden>
[4] John L Daschbach <address@hidden>
[5] Michael Smolsky <address@hidden>
[6] Jim Van Zandt <address@hidden>
[7] Przemek Klosowski <address@hidden>
[8] Matthias Roessler <address@hidden>
[9] Krzysztof Gozdziewski <address@hidden>
[10] Rick Niles <address@hidden>
[11] Carl Wilhelm Welin <address@hidden>


------------------------ benchmark 1.5 -----------------------------
bm_version = ["bm ", "1.5"];

# Benchmark for octave.
# Francesco Potorti` <address@hidden>
# 1996/04/04 11:03:51
# ftp://fly.cnuce.cnr.it/pub/benchmark.m

printf ("Octave benchmark version %s\n", bm_version);

# To add reference times for your machine run the benchmark and
# add the values contained in the bm_mytime vector.
#
if (strcmp(version(), "1.1.1"))
  # Matthias Roessler <address@hidden>
  bm_refname = "Sun Sparc 10/40";
  bm_reftime = [1.61 4.54 3.88 2.12 2.47];
elseif (strcmp(version(), "ss-960323"))
  # Rick Niles <address@hidden>
  bm_refname = "Sun Sparc 10/50";
  bm_reftime = [2.00 8.95 2.60 3.03 1.11];
else
  error ("No reference time for this version of octave.\n")
endif

# Use clock() 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.
global bm_uses_cputime = (cputime() != 0);
if (!bm_uses_cputime)
  disp ...
    ("WARNING: if other processes are running the figures will be inaccurate");
endif
function t = bm_start ()
  global bm_uses_cputime
  if (bm_uses_cputime)
    t = cputime();
  else
    t  = clock();
  endif
endfunction
function et = bm_stop (t);
  global bm_uses_cputime
  if (bm_uses_cputime)
    et = cputime()-t;
  else
    et = etime(clock(),t);
  endif
endfunction
  
# Used for the lsode test.  
clear xdot
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);
endfunction

#
# Do benchmark
#
function [name, time] = bm_test(f,rep)          # Actual test functions
  global s0 t;
  start = bm_start();
  for i=1:rep
    if (f == 1)
      name="Matrix inversion (LAPACK)";
      bm_x=inv(hadamard(8));
    elseif(f==2)
      name="Schur decomposition (LAPACK)";
      bm_x=schur(hadamard(7));
    elseif(f==3)
      name="Differential equation (LSODE)";
      bm_x=lsode("xdot",[1;2],(t=linspace(0,50,200)'));
    elseif(f==4)
      name="Fourier transforms (FFTPACK)";
      bm_x=ifft2(fft2(hadamard(8)));
    elseif(f==5)
      name="for loop";  
      for i=1:6000;bm_x=i^2;endfor
    endif
  endfor
  time = bm_stop(start)/rep;
endfunction

bm_targetaccuracy = 0.025;
bm_minrepetitions = 7;
bm_maxseconds = 60;
bm_runtime = 3;
bm_mytime = bm_reftime;

printf ("Speed of octave %s on %s relative to %s\n", ...
        version(), computer(), bm_refname); fflush(stdout);
for f = 1:length(bm_reftime)
  res = [];
  bm_test(f,1);                         # increase the RSS, load things
  [name,time] = bm_test(f,1);           # evaluate name and time
  printf("%-33s", name);                # print name
  rep = max(1,round(bm_runtime/time));  # no. of repetitions per run
  for runs = 1:bm_maxseconds/bm_runtime # do runs
    [name,time] = bm_test(f,rep);       # run
    res(runs) = bm_reftime(f) / time;   # store relative performance
    if (runs < bm_minrepetitions)       # jump rest of for loop
      continue 
    endif
    # purged results: remove min and max elements
    pres = res((res != max(res)) & (res != min(res)));
    if (std(res)/mean(pres) < bm_targetaccuracy)
      break 
    endif
  endfor                                # end of repetitions loop
  bm_mytime(f) = bm_reftime(f)/mean(pres);
  # print 95% confidence interval
  printf("%5.2f +/- %.1f%% (%d runs)\n", ...
         mean(pres), 200*std(res)/mean(pres), runs*rep); fflush(stdout);
endfor
clear bm_x
# Display the geometric mean of the results
printf ("-- Performance index (%s): %.2g\n\n", bm_version, ...
        prod(bm_reftime./bm_mytime)^(1/length(bm_reftime)))


reply via email to

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