From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,bf98da65c7d90c8a X-Google-Attributes: gid1164f8,public X-Google-Thread: 114b0c,bf98da65c7d90c8a X-Google-Attributes: gid114b0c,public X-Google-Thread: 1094ba,bf98da65c7d90c8a X-Google-Attributes: gid1094ba,public X-Google-Thread: fee84,bf98da65c7d90c8a X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-06-24 13:42:24 PST Xref: gmd.de comp.sys.dec:8422 comp.unix.osf.osf1:531 comp.lang.fortran:6680 comp.sys.hp:19883 Path: gmd.de!xlink.net!howland.reston.ans.net!usc!cs.utexas.edu!uunet!tis.com!mjr From: mjr@tis.com (Marcus J Ranum) Newsgroups: comp.sys.dec,comp.unix.osf.osf1,comp.lang.fortran,comp.sys.hp Subject: Re: Summary: Alpha Performance Date: 24 Jun 1993 20:22:31 GMT Organization: Trusted Information Systems, Inc. Message-ID: <20d2e7$845@sol.TIS.COM> References: <24JUN199310084315@author.gsfc.nasa.gov> <20clhd$qls@sol.TIS.COM> <1993Jun24.144119.1@uwovax.uwo.ca> NNTP-Posting-Host: otter.tis.com > Just a tiny observation from someone who doesn't know much detail > about KAP or vendor compilers. I rather suspect that some vendors > compilers are already doing some "kap"ping (no tm :-), whether they > use KAP (tm) or not. Compiler optimization is a different game from what I call "benchmark-oriented optimization." I suspect that most of the folks who work on optimizers use some kind of benchmark against which to measure the effectiveness of their optimizations. But that's just a way of seeing how much the optimization helped. There's a world of difference (IMHO) between an optimization that makes (say) string copying run 2% faster and an optimization that makes the MATRIX benchmark 300% faster. Does anyone have the SPEC numbers handy for the individual benchmarks?? I threw 'em away when I decided SPEC wasn't worth talking about in honest company anymore, but if you look at the before and after pictures, you'll see that HP and IBM suddenly picked up something like a 200% improvement on ONE floating point benchmark. That doesn't usually indicate that someone came up with a clever general optimization that's going to make most people's code run faster; that indicates that someone cracked the benchmark. There's a fun story about benchmarks. Byte magazine used to use sieve of eratosthenes for primes less than 1000 as a benchmark. Apparently someone as a joke put code in their compiler to recognize the DFA of the sieve benchmark and simply return the correct values. They were honest enough to explain the hack they'd pulled, and everyone was amused. Now, having your compiler recognize certain common subexpression blocks might be a legitimate optimization. Having your compiler recognize subexpressions common to specific benchmarks is pure sleaze - especially if you're a major computer vendor and you sell systems based on it!! We're not talking a minor effect, here. There used to be a bunch of graphs put out by SPEC showing the performance of each system on each benchmark. Nice bar graphs. And on some vendors graphs, the bar for MATRIX was massively bigger than than all the others. It doesn't take a wizard with a degree in statistics to realize that a value like that is going to pull the rest of the benchmark way off where it would otherwise be. Of course your vendor didn't come to you and tell you, "hey, we have one HOT BOX for you if you're running MATRIX!!" - no, they tell you they have a machine that does some big number of SPECmarks. Nauseated yet? It gets worse. The SPEC rules have something about how you're supposed to benchmark the machine with available, stock software. So *SOME* of the vendors shipped KAP. That way, if all you use your computer to do is run MATRIX, you too can get some kick a** performance. Neat, huh? But don't try this with your box-stock compiler. And don't expect KAP to make ALL your code faster. Sure, it'll help some a bit, but as I said, I've heard it has even broken code in the past. That's not really a suprise because I'm sure the folks who did KAP were spending 99% of their time testing it against MATRIX. In short, yes, most vendors are working on their optimizers all the time (or should be) and most likely they are working on "reasonable" optimizations. It's too expensive to put support into your general purpose compiler for breaking benchmarks - that's what consultants who write crap like KAP are for. SPEC blew it because they didn't blow the whistle on this game, and now they have lost any credibility they might have had. I'd trust Norton Utilities "sysinfo" results as much as SPEC. Those of you who already owned systems from the vendors who are publishing KAP-ized benchmarks: didn't you suddenly feel your machine get 40% faster from one OS release to another? Disappointing, huh? mjr. PS - Enclosed is the RAP (Ranum Applications Preprocessor) for applications that are known to produce no output and exit with a value of zero. Feed your sources through this and it will preprocess them into an intermediate preprocessed version that you run through your compiler and optimizer and execute) main() { printf("main() { exit(0); }\n"); } I have used this preprocessor on some of my benchmarks and sped them up drastically. On others, it gives incorrect answers, but that's OK, the SPEC folks haven't complained....