Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!clyde!cbosgd!ihnp4!occrsh!uokmax!rmtodd From: rmtodd@uokmax.UUCP (Richard Michael Todd) Newsgroups: comp.os.minix Subject: Re: minix C compiler performance Message-ID: <582@uokmax.UUCP> Date: Sun, 31-May-87 23:44:13 EDT Article-I.D.: uokmax.582 Posted: Sun May 31 23:44:13 1987 Date-Received: Tue, 2-Jun-87 07:10:52 EDT References: <1131@rocksvax.UUCP> Organization: University of Oklahoma, Norman, OK Lines: 40 Summary: main difference may be register variables In article <1131@rocksvax.UUCP>, martyl@rocksvax.UUCP (Marty Leisner) writes: > Under Minix, dhrystone (at least the copy I got from netlib) turned about > 250 dhrystones/second. Under Aztec C/MS-DOS on the same hardware, dhrystone > turned 1200+ dhrystones/second. Well, what little testing I've done doesn't show that drastic a difference between the two compilers, but there is a difference in execution times. I'm not familiar with the Dhrystone benchmark--does it use register variables heavily? You see, the Minix compiler apparently ignores register declarations, whereas Aztec C (I have the developer's system, v3.40a), seems to handle up to two int-sized register vars, one in si, one in di. It makes a good bit of difference. I just recently did a slightly modified sieve, (I upped the number of iterations to 100 from 10) compiling both with and without register declarations, and linking with the Minix library and running them through dos2out, so that the two Aztec-compiled versions (with & without register declarations) would run under Minix. This ensures that we aren't accidentally including any differences arising from the different operating environments (DOS and Minix). Timing them and the sieve compiled under Minix's compiler gave these results (all results are user time given by /usr/bin/time, CPU is 8088 at 4.77MHz) Aztec cc with register declarations: 96.5 sec. Aztec cc without register declarations: 132.4 sec. Minix cc 141.0 sec. You can see that without register declarations, Aztec's code gives performance slightly better than the Minix cc. The register variables make a huge difference. Of course, the sieve is a rather limited benchmark; other benchmarks like Dhrystone will get different improvements by addition/subtraction of register variables. > A few questions about the Minix C compiler and the distribution disks: > 1) which compiler was the AT kernel/utilities compiled with? > When I recompiled the kernel, the sizes of the linked files > didn't agree with the distribution versions. Apparently it was the PC/IX compiler. The Minix compiler produces somewhat larger code. From my limited experimentation with Aztec C -- recompiling the shell and fs -- the code size produced is roughly comparable to the PC/IX output. -------------------------------------------------------------------------- Richard Todd USSnail:820 Annie Court,Norman OK 73069 UUCP: {allegra!cbosgd|ihnp4}!okstate!uokmax!rmtodd