From owner-freebsd-current Tue Jan 23 16:27:45 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id QAA00298 for current-outgoing; Tue, 23 Jan 1996 16:27:45 -0800 (PST) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id QAA00288 for ; Tue, 23 Jan 1996 16:27:39 -0800 (PST) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.6.12/8.6.12) with ESMTP id QAA03484; Tue, 23 Jan 1996 16:27:25 -0800 Message-Id: <199601240027.QAA03484@austin.polstra.com> To: Andreas Klemm cc: freebsd-current@freebsd.org Subject: Re: dhrystone 2.1 result for gcc-2.7.2 with Pentium patches is poor In-reply-to: Your message of "Tue, 23 Jan 1996 21:54:10 +0100." <199601232054.VAA02000@knobel.gun.de> Date: Tue, 23 Jan 1996 16:27:25 -0800 From: John Polstra Sender: owner-current@freebsd.org Precedence: bulk Andreas Klemm wrote: > > I haven't tried those patches, but this kind of thing comes up regularly > > in compiler-related newsgroups. Look: the Dhrystone "benchmark" is > > _completely_ worthless and meaningless for today's compilers. You are > > wasting your time messing with it. It will only mislead you. > > Ok, but then please tell me another easy way how I can proofe the > quality of the resulting code... The SPEC benchmarks seem to be what everybody uses, but, unfortunately, they cost money. I'd recommend that you look at the comp.benchmarks FAQ. The latest version is at: ftp://rtfm.mit.edu/pub/usenet-by-group/comp.benchmarks/ in the file "comp.benchmarks_Frequently_Asked_Questions,_With_Answers". (No kidding!) An older version is on the Web at: http://hpwww.epfl.ch/bench/bench.FAQ.html > I simply thought, that _if_ there are patches for gcc, that add support > for a Pentium processor, then nearly every kind of executable should > speed up because gcc now uses the whole power of ... hmmm let's say > instruction set. > > I really didn't expect slower results. Please explain to me why > you think, that those Pertium patches are possibly really ok > if the dhrystone result is relatively poor. I really don't know whether the Pentium patches are any good or not -- I have no idea. I was only trying to make the point that Dhrystone is not a good benchmark to use for modern compilers. It was always supposed to be a hardware benchmark anyway, not a compiler benchmark. The instructions that came with it used to forbid you from turning on optimization when compiling it! Dhrystone is dominated by string operations, especially strcpy with a constant source string, like this: strcpy(buf, "Man soll das Fell des Bären nicht verteilen," " bevor man ihn erlegt hat."); Dhrystone-aware compiler writers long ago added optimizations that turn this construct into an open-coded string of 4-byte store immediate instructions. (I've done it myself a few times.) Doing so makes the Dhrystone run blindingly fast, but it doesn't make a significant difference for any real-world application. Maybe this kind of optimization confuses the changes introduced by the Pentium patches -- who knows? My point was just that the numbers you get from Dhrystone aren't a reliable basis for drawing any conclusions about your compiler. Besides, if I remember correctly, the two numbers you quoted were, relatively speaking, _very_ close together. The difference between them is probably not significant. -- John