Current file: examples/benching.xg: Thu Apr 11 20:51:43 2002
A collection of timing benchmarks. Can take quite a while to complete, and doesn't generate
overly nice output! Performance measured in bogoflops, <err> I mean seconds :)
Current xgraph info:
 xgraph examples/benching.xg
 XGraph build gcc[Apr 11 2002 20:40:40], version 200204011; ascanfc modules built with MipsPro cc.
 Executed d.d. Thu Apr 11 20:51:59 2002
 Input files: 'examples/benching.xg' 
 Working directory: /usr/people/bertin/work/src/xgraph
 Last opened on display bola.college-de-france.fr:0.0/-1/-1 (visual 0x24, 16 planes TrueColor) by bertin


1000000 times empty loop took 2.5012080000000001(real)/2.4300000000000002(user) seconds
1000000 times empty loop took 2.488353(real)/2.52(user) seconds
Calibrating adapted loop size (should be 0.5s)... 200936 times empty loop took 0.50773699999999999(real)/0.45000000000000001(user) seconds
Calibrating adapted loop size (should be 0.5s)... 197874 times empty loop took 0.49680199999999997(real)/0.54000000000000004(user) seconds

timing of addition of 2 arrays, either with a for-toMAX[] loop construct (scalar addition), or
with (internal) array addition. The latter is done 10x to increase the reliability of the measured
duration. Procedures are used to ensure that the code is executed from compiled representations
(*EVAL* would not automatically compile the array-addition test procedure [test2]).
On a PIII 450Mhz (linux), test1 completes in around 5.8s, test2 under 1s (meaning that the array
addition is some 60x faster than the looped scalar addition).

Addition of 2 [197874] arrays in a scalar-addition loop, without support for simple array arithmetic: 4.8480670000000003(real)/4.8099999999999996(user)s
Addition of 2 [197874] arrays in a scalar-addition loop, with support for simple array arithmetic: 4.8951039999999999(real)/4.7599999999999998(user)s
10x array[197874] addition without support for simple array arithmetic, array addition (add[&z,&x,&y]): 0.001853(real)/0(user)s
10x array[197874] addition with support for simple array arithmetic, array addition (add[&z,&x,&y]): 0.85641299999999998(real)/0.84999999999999998(user)s

Comparing the special 2-D indexing function 2Dindex to nDindex

197874 times 2Dindex[1,2,3,4]: 1.959225(real)/1.9299999999999999(user)s
197874 times nDindex[1,2,3,4]: 2.266775(real)/2.3100000000000001(user)s

Some loops to time the effect of $UseConstantsLists (and the '?' last-value operator):

197874 times 'progn[2,add[2,kk]]' took 3.073699(real)/3.04(user) seconds with $UseConstantsLists=0
197874 times 'progn[2,?add,?ran]' took 1.9564520000000001(real)/1.9399999999999999(user) seconds with $UseConstantsLists=0
197874 times 'progn[2,add[2,kk]]' took 2.8815719999999998(real)/2.77(user) seconds with $UseConstantsLists=1
197874 times 'progn[2,?add,?ran]' took 1.6814469999999999(real)/1.7(user) seconds with $UseConstantsLists=1
197874 times 'var[foo[?ran]]'=0.44658343479654405 took 2.754553(real)/2.75(user) seconds with $UseConstantsLists=0
197874 times 'var[foo[?ran]]'=0.44658343479654405 took 1.5942240000000001(real)/1.53(user) seconds with $UseConstantsLists=1
197874 times 'var'=0 took 0.79541499999999998(real)/0.80000000000000004(user) seconds with $UseConstantsLists=0
197874 times 'var'=0 took 0.78183500000000006(real)/0.79000000000000004(user) seconds with $UseConstantsLists=1
197874 times 'var[$loop]'=197873 took 1.7630170000000001(real)/1.76(user) seconds with $UseConstantsLists=0
197874 times 'var[$loop]'=197873 took 1.57887(real)/1.49(user) seconds with $UseConstantsLists=1
197874 times 'var[foo[$loop]]'=197873 took 2.7524280000000001(real)/2.7400000000000002(user) seconds with $UseConstantsLists=0
197874 times 'var[foo[$loop]]'=197873 took 1.6051039999999999(real)/1.6200000000000001(user) seconds with $UseConstantsLists=1
197874 times 'var[foo[bar[$loop]]]'=197873 took 3.7422370000000003(real)/3.6200000000000001(user) seconds with $UseConstantsLists=0
197874 times 'var[foo[bar[$loop]]]'=197873 took 2.5755370000000002(real)/2.6000000000000001(user) seconds with $UseConstantsLists=1
