Need 286 "C" benchmark

Bart Massey bart at reed.UUCP
Thu May 30 10:23:16 AEST 1985


> In article <583 at intelca.UUCP> cem at intelca.UUCP (Chuck McManis) writes:
> >> [quoting someone else...]
> >> I just love the contact sport of "combative benchmarking".  I note how
> >> the source code for the Hofstader (sp?) benchmark just accidentally
> >> happens to declare its register variables from the least-used to the
> >> most used, the opposite of normal C convention.  And by coincidence,
> >> there are three of those little hummers... and we're comparing a
> >> 68K with >3 regvars against a 286 with only 2!
> >> This means that the single most heavily used register variable will
> >> be in a reg on the 68K and on the frame for a 286.  My my, what a
> >> terrible accident.
> 
> When I posted the benchmark I was not aware of all that.  But what's the
> complaint? Are you saying that its not fair to use registers since one
> chip only has 2 of them?   In the real world programs would use a lot more
> than two registers.  Why are you trying to hide architectural weaknesses?
> Benchmarks should be just the thing to point out such weaknesses.

	Quite aside from the rest of this argument, I believe some folks
have still missed the point.  It isn't that >3 regvars are declared in the
code -- it's the ORDERING!  K&R explicitly require compilers to allocate
regvars IN THE ORDER THEY'RE DECLARED, stopping only when they run out of
registers.  The purpose of this ordering requirement is to ENSURE THAT THE
MOST HEAVILY USED VARIABLES END UP IN REGISTERS.  If you had put that "most
heavily used register variable" ahead of all the other register variables
in the declaration, no one would have complained.  This may be an honest
mistake, but it still makes for a poor "benchmark".

	Anyway, enough on this subject already,

					Bart Massey
					..tektronix!reed!bart

I learned to program on a TRS-80 in "Level II BASIC" -- thus, all other machines
appear equally fast to me...



More information about the Comp.lang.c mailing list