en fr

Sysquake Pro – Table of Contents

Sysquake – Table of Contents

Sysquake for LaTeX – Table of Contents

Library - bench

Library bench implements functions to evaluate the performance of the LME implementation on the platform it is running on. It measures the amount of time required to execute different kinds of operations and gives numbers which can be seen as the equivalent frequency of the reference computer.

We intend to keep bench the same as long as it makes sense to make possible the comparison of successive generations of hardware.

The following statement makes available functions defined in bench:

use bench

The library if written in such a way that it is compatible with a Matlab M-file: the first function defined is the main entry point (all other functions are subfunctions which should not be called directly); and features specific to LME, such as C- or C++-style comments, parenthesis for output arguments, and keywords public and private are avoided.

Function

bench

Run benchmark function.

Syntax

use bench
bench
bench(totaltime)
bench(totaltime, n)
(freq, names) = bench
(freq, names) = bench(totaltime)

Description

bench runs the benchmark, spending about 5 seconds for each phase. It displays the result of each phase and the average value, as the equivalent frequency of the reference platform in MHz, an Apple PowerBook G4 17" 1.33 GHz running under Mac OS 10.3.5 (therefore running bench gives about 1330). Finally, it displays in a table the comparison with a few other platforms.

With an input argument, bench(totaltime) computes the number of iterations of each phase so that the total time is about totaltime seconds, divided in equal amounts for each phase. If totaltime is negative, the number of iterations per second is displayed instead of the equivalent frequency of the reference platform. With two input arguments, bench(totaltime,n) performs the whole benchmark n times and keeps the best value for each phase. Reference values are obtained with bench(35,10).

With output arguments, (freq,names)=bench returns in freq a vector of phase scores and in names a list of phase names.

Example

use bench
bench
Scores (PowerBook G4 at 1.33 GHz = 1330 MHz):
        lu: 789.336 MHz
       max: 774.279 MHz
 fibonacci: 776.552 MHz
     uint8: 777.402 MHz
   strfind: 772.787 MHz
      list: 786.320 MHz
   funcall: 785.705 MHz
   Average: 780.340 MHz
                                    AVERAGE
    Dell Dimension 2400 P4 3.06 GHz: 2749.3
        Apple PowerBook G4 1.33 GHz: 1330.0
                   ** This computer:  780.3
             Apple iBook G3 500 MHz:  497.4
              Sun Blade 100 500 MHz:  367.5
   Generic PC Pentium Win2K 300 MHz:  350.9
Apple PowerBook 3400 ppc603 200 MHz:  133.7
       CerfBoard 255 XScale 400 MHz:   84.4
Kontron X-board<861> SC1200 266 MHz:   76.9
Palm Zire 71 OMAP 144 MHz, emu M68k:    1.2

See also

tic, toc