[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6. Nana Performance Measurement

A tool is provided for measuring code/time requirements for arbitrary code fragments. This is kept in the `perf' directory and is not built by default. If you wish to use this tool use the following targets:

 
% cd perf
% make perf

The output is `perf.tex', `perf.dvi' and `perf/index.html'.

Note that the measurement requires the following:

As an indication of the values you can expect here is part of the results for `make perf' on a 200Mhz Cyrix MMX (i386) chip which runs at about 200 BogoMips under FreeBSD 2.2.6 with `-O'.

`assert(i >= 2);' 28 bytes, 19ns.

`TRAD_assert(i >= 2);' 47 bytes, 20ns.(16)

`I(i >= 2);' 9 bytes, 18ns.

`DI(i >= 2);' 1 byte, 147.4us.

`I(A(int i=0, i!=10, i++, a[i]>=0));' 28 bytes, 287ns.

`d = now();' 8 bytes, 3.1us.

`printf("helloworld\n");' 13 bytes, 9.1us.

`L("helloworld\n");' 18 bytes, 8.9us.

`DL("helloworld\n");' 1 byte, 26.4us.

Note that these measurements were on a system that was configured with `I_DEFAULT=fast ./configure'. The default output of `./configure' produces nice error messages at the cost of increased code space.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Marius Tomaschewski on February, 12 2004 using texi2html