[comp.os.minix] c68 optimization

pete@ohm.york.ac.uk (-Pete French.) (03/14/91)

I have just compiled c68 version II patchlevel 1 on one of our SUNs here
in the department and was interested in comparing the speed of the code
produced. To do this I grabbed a copy of the nearest benchmark program
(dhrystone) and ran a few tests - using c68gas and then the gnu assembler/linker
to produce a SUN executable. I then discovered an interesing fact... The code
runs FASTER if it isnt optimised.

Timings on this SUN are :

c68 -opt -reg -short :         1562 ds/s
c68 -noopt -short    :         2173 ds/s

c68 -opt -reg -noshort :       1315 ds/s
c68 -noopt -noshort    :       1851 ds/s

The optimised code seems to run at about 71% of the speed of the
unoptimised code ! This seems very perculiar to me - have I done
something very stupid or is there something funny about the
optimisation of the code - the optimised code does come out
to be 80% of the size of the unoptimised so something is being done.

any comments ? (I have yet to try it under MINIX)
-- 
-Pete French.                      /  "Two wrongs don't make a right,
Adaptive Systems Engineering      /    - but three lefts do !"

HBO043%DJUKFA11.BITNET@cunyvm.cuny.edu (Christoph van Wuellen) (03/19/91)

I think it is just a typo in cmain.c, function options()

replace .. opt_option = ! value       by      ... opt_option = value

I never use -opt, -noopt, this was meant for compiler debugging.

It is somehow striking that the non-optimized code is shorter since upon
optimization, useless code is eliminated, arithmetic expressions are combined
etc.

C.v.W.