S9 LIB  (runtime-stats procedure <option> ...)  ==>  list

Measure the runtime of the unary PROCEDURE when applied to
a range of values (see below). RUNTIME-STATS returns a list
containing the data it gathered. Each entry of the list has
the following form:

      (value (seconds microsecs) reductions conses nodes gcs)

VALUE is the valued passed to the procedure. The sum of SECONDS
and MICROSECS is the time the procedure took to complete.
REDUCTIONS is the number of reductions (i.e.: primitive S9
operations) that the compuation of the procedure value took.
CONSES and NODES are the number of cons cells and the total
amount of storage allocated, respectively. GCs is the number
of garbage collections performed during the computation.

The following options are used to pass ranges to RUNTIME-STATS:

'START: INTEGER  The smallest value to be measured.
'END: INTEGER    The largest value to be measured.
'STEP: INTEGER   The increment between values.
'SET: LIST       A set of values.

There options are used to control the output of RUNTIME-STATS:

'PLOT: SYMBOL    Instead of returning the data, plot them.
                 SYMBOL is used to specify the field to plot:
                 'VALUE, 'TIME, 'REDUCTIONS, 'CONSES, 'STORAGE
                 'GC.
'WIDTH: INTEGER  The width and height of the graph printed by
'HEIGHT: INTEGER the 'PLOT: option (default: h x w = 77x22 plus
                 border).
'TABLE: #T       Instead of returning the data, print a nicely
                 formatted table containing the values.
'COMPRESS: #F    By default RUNTIME-STATS will compress the curve
                 so that the graph will always fill the entire
                 X-range. Setting this value to #F will disable
                 compression.

(runtime-stats (lambda (x) (expt 2 x))
               'start: 1000 'end: 10000 'step: 1000)
  ==>  (( 1000 (0  23755) 276   96237   97242  0)
        ( 2000 (0  86518) 297  353246  354328  3)
        ( 3000 (0 177415) 322  783333  784501  6)
        ( 4000 (0 301546) 318 1354943 1356102 11)
        ( 5000 (0 477758) 335 2140334 2141561 18)
        ( 6000 (0 681763) 343 2935950 2937195 25)
        ( 7000 (0 923639) 343 4145271 4146516 36)
        ( 8000 (1 180418) 339 5293779 5295015 46)
        ( 9000 (1 519193) 356 6806279 6807583 60)
        (10000 (1 855957) 356 8327850 8329154 73))
