sjl@amdahl.UUCP (Steve Langdon) (09/13/85)
In article <3235@nsc.UUCP> Chuq Von Rospach was discussing the new version of Mac C from Cosulair (4.0). He said "(time to re-benchmark...)" and I agreed. I did of course try the sieve and got a best time of 2.78 seconds (register everything, 16 bit ints) and a worst time of 5.6 seconds (no register stuff, 32 bit ints). However a copy of the Dhrystone benchmark was recently posted in net.sources so I decided to try that. The results follow in the form of an updated table from the opening comments in the program. Following that I used diff to show the changes between the original file and one of the versions I ran. Note that I have a 2 Meg Mac using the Levco upgrade. This probably results in better times than a regular Mac as screen refresh cycles do not affect the lower 1.5 Meg where the program was executing. * MACHINE MICROPROCESSOR OPERATING COMPILER DHRYSTONES/SEC. * TYPE SYSTEM NO REG REGS * -------------------------- ------------ ----------- --------------- * IBM PC/XT 8088-4.77Mhz PCDOS 2.1 CI-C86 2.1 ???? ???? * IBM PC/XT 8088-4.77Mhz PC/IX cc ???? ???? * IBM PC/XT 8088-4.77Mhz VENIX/86 2.0 cc 297 324 * IBM PC/AT 80286-6Mhz PCDOS 3.0 CI-C86 2.1 666 684 * Macintosh 68000-7.8Mhz 2M Mac Rom Mac C 32 bit int 694 704 ** * ATT 3B2/300 MAC32-?Mhz UNIX 5.0.2 cc 735 806 * Macintosh 68000-7.8Mhz 2M Mac Rom Mac C 16 bit int 877 909 ** * IBM PC/AT 80286-6Mhz VENIX/86 2.1 cc 961 1000 * ATT PC7300 68010-10Mhz UNIX 5.2 cc 1041 1111 * Sun2/120 68010-10Mhz Sun 4.2BSD cc 1136 1219 * PDP 11/70 - UNIX 5.2 cc 1162 1250 * IBM PC/AT 80286-7.5Mhz VENIX/86 2.1 cc 1190 1315 * * VAX 11/780 - UNIX 5.2 cc 1515 1562 * ATT 3B20 - UNIX 5.2 cc 1515 1724 * Lisa 68000-??Mhz ???? ?? ???? ???? * * * 15Mhz crystal substituted for original 12Mhz; * ** with Levco 2 Megabyte memory expansion board * ************************************************************************** Now the diff results. 0a1,4 > /* The following line instructs Mac C to use 16 rather than 32 bits for int */ > #Options -I > #include <stdio.h> /* Mac C would be unhappy without this */ > #define REG register /* Unlike cc there is no command line */ 25a30 > * Macintosh 68000-7.8Mhz 2M Mac Rom Mac C 32 bit int 694 704 ** 26a32 > * Macintosh 68000-7.8Mhz 2M Mac Rom Mac C 16 bit int 877 909 ** 34d39 < * Macintosh 68000-??Mhz ???? ?? ???? ???? 37a43 > * ** with Levco 2 Megabyte memory expansion board 65c71 < #undef NOTIME /* Define if no time() function in library */ --- > #define NOTIME /* Define if no time() function in library */ 199c205 < --- > getchar(); /* inserted to give me time to read results */ 394,402c400,401 < { /* CI-C86 time function - don't use around midnight */ < long t; < struct regval {unsigned int ax,bx,cx,dx,si,di,ds,es; } regs; < < regs.ax = 0x2c00; < sysint21(®s, ®s); < t = ((regs.cx>>8)*60L + (regs.cx & 0xff))*60L + (regs.dx>>8); < if (p) *p = t; < return t; --- > { /* Macintosh time function */ > return *((long *)0x16A)/60; I would be interested in seeing results for other compilers. Mac C 4.0 is a significant improvement to an already good package. The executable file was just under 14.5K. It is worth noting that Mac C 4.0 and the new Consulair Linker are compatible with the Apple MDS so it is easy to use with Apple released files. -- Stephen J. Langdon ...!{ihnp4,cbosgd,hplabs,sun}!amdahl!sjl [ The article above is not an official statement from any organization in the known universe. ]