[comp.sys.atari.st] Lattice C 3.04

pes@ux63.bath.ac.uk (Smee) (07/11/87)

a
Well, I finally found a copy of Dhrystone.  I've run it through Lattice 3.04.
With interesting results.  For those of you who've seen figures for other
machines/compilers, the results were:

   No register variables  --  757 Dhrys/sec (66 sec run time)
   Register variables     --  781 Dhrys/sec (64 sec)

520ST, ROM TOS, 50000 iterations.  Figures I'd seen for the previous version
of Lattice would suggest that 3.04 is something like 1.5 to 1.6 times faster
than the last one, for th the sorts of things dhrystone checks -- basically
'typical' integer and char stuff.  (Earlier less formal measurements I've
taken make it look like floating point, not tested by dhrystone, is 8 to
10 times faster with this version than with the previous -- I don't have
whetstone so can't check formally.

I did have trouble with the use of 'command line define' (compiler arg of
-dREG=register) which might have been me but which I think is more likely
a bug.  I had to resort to putting a #define REG register into the source.

Just as a matter of interest, I also ran a version of DHRY which I modified
by changing all 'int' declarations to 'short int'.  (The few things which need
'long int' are specifically so declared and I left them alone.)  I thought
this might give a useful check as most ST compilers default int to short,
while Lattice defaults it to long.  I got a wonderfully anomalous result.
Figures were:

   NO REGISTER VARIABLES -- 833 Dhrys/sec (60 sec) (short ints, remember)
   Register variables    -- 806 Dhrys/sec (62 sec)

Looks like the compiler's got better ideas about what to do with the registers
than the benchmark writers.  I think I shall report this back to MetaComCo
just for fun.

Paul