Path: utzoo!utgpu!watmath!julian!uwovax!7103_300 From: 7103_300@uwovax.uwo.ca (Eric Smith) Newsgroups: comp.sys.atari.st Subject: Re: Comment on PD/Shareware C compiler Message-ID: <2171@uwovax.uwo.ca> Date: 8 May 89 09:11:51 GMT References: <1048@orbit.UUCP> <1471@atari.UUCP> <703@forty2.UUCP> <539@TSfR.UUCP> Lines: 49 Organisation: University of Western Ontario, Canada In article <539@TSfR.UUCP>, usenet@TSfR.UUCP (usenet) writes: > In article <703@forty2.UUCP> poole@forty2.UUCP (Simon Poole) writes: >>In article <1471@atari.UUCP> apratt@atari.UUCP (Allan Pratt) writes: >>> [Discussion of lousy Dhrystones for GCC] >>> .....It is beaten by ALL >>>the other Atari C compilers I could find (Dhrystone 2.1), by a factor of >>>two or more in some cases. This includes using -O, but no other >>>optimization options; some may pay, others aren't available (like >>>"no-function-cse") ... >> [discussion of problems with benchmarking deleted ] > If the Dhrystone was completely invalid, it wouldn't be used. 10-15% > variance can probably be ignored, but when a compiler turns in results > that are half of the other compilers, it's probably an indication that > something is badly damaged in that compiler. Here are my benchmark results for the GCC v1.31, Sozobon, and Laser C v1.01. Several things to keep in mind (besides, of course, the generic problems with benchmarks): (1) Both Laser and the GCC have newer versions available (1.35 and 2.0 respectively). (2) I used Dhrystone 1.1, NOT 2.1 , so these results are not directly comparable to the ones posted by Mr. Pratt. They should give an indication that the GCC does indeed generate good code, though. (3) I don't know why GCC 1.23 supposedly generated such poor code. I do know that its library had a few bugs; sometimes a buggy time() routine can do strange things to timing routines :-). In the table below, all compilations are done with the -O flag, where available. The GCC has several extra levels of optimization available which were *not* used. Benchmark results: Compiler Dhrystones/sec Laser 1.01 818 Laser w. regs. 849 GCC 1.31 979 GCC w. regs. 979 (<- the GCC optimizer knows how to use regs.) Sozobon 1.0 932 Sozobon w. regs 978 One final note: Laser and Sozobon were using 16 bit int's; GCC uses 32 bit int's. Newer versions of the GCC also support 16 bit int's (actually 1.31 did as well, but the library didn't have any 16 bit routines). -- Eric R. Smith email: Dept. of Mathematics 7103_300@uwovax.uwo.ca University of Western Ontario 7103_300@uwovax.bitnet London, Ont. Canada N6A 5B7 (a shared mailbox: put my name on ph: (519) 661-3638 the Subj: line, please!)