[comp.unix.questions] Benchmarking

mwm@eris.BERKELEY.EDU (Mike (My watch has windows) Meyer) (12/10/87)

[Followups have been pointed to comp.lang.misc.]

In article <6473@ihlpa.ATT.COM> kai@ihlpa.ATT.COM (55664-Irwin) writes:
<I've worked with a COBOL compiler by Advanced Computer Technics or somthing
<like that, anyway its ACT COBOL for short. Its not a fast compiler but the
<object code it generates flies! Bench Marked against RM-COBOL it was some
<175 times faster in non I/O intensive programs, and about 25 times faster
<in ISAM reads. The bench marks were simple, count in a single register and 
<tell me when you get to a thousand. [... - deleted, mwm ] The I/O test
<was equally as simple, count to a thousand and write a record every increment,
<first in a flat file then in a keyed file, then read one record at a time and
<display on the terminal with no LF.

Like most benchmarks, such things aren't really worth a lot.

For instance, all the above measures is how fast the code generated by
the compiler for a simple operation is. If all your programs are
nothing but simple operations, that's great. But real applications
tend to be composed of long sequences of simple operations, with
interesting interrelations between the operations. A good compiler can
take advantage of those interelations to produce faster code.
Likewise, things like how the compiler handles the interface to the OS
routines, and whether it has the ability to inline code some library
routines, can make a significant difference. Such things are liable to
be missed completely by simple "count" benchmarks.

As a real example, I recently upgraded one of the compilers I use to a
new version. The claim was that it was significantly faster than the
old version (and the competition :-). On simple benchmarks (counting,
etc.) it was almost identical to the old one. However, on real
applications the code it produced ran in about 70% of the time of the
old one.

Simple counting benchmarks do have their uses. I don't think that
comparing compilers on the same machine is one of them.

	<mike
--
Take a magic carpet to the olden days			Mike Meyer
To a mythical land where everybody lays			mwm@berkeley.edu
Around in the clouds in a happy daze			ucbvax!mwm
In Kizmiaz ... Kizmiaz					mwm@ucbjade.BITNET