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: 1094ba,bf98da65c7d90c8a X-Google-Attributes: gid1094ba,public X-Google-Thread: 114b0c,bf98da65c7d90c8a X-Google-Attributes: gid114b0c,public X-Google-Thread: fee84,bf98da65c7d90c8a X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-06-24 15:07:55 PST Xref: gmd.de comp.sys.dec:8429 comp.unix.osf.osf1:534 comp.lang.fortran:6684 comp.sys.hp:19887 Newsgroups: comp.sys.dec,comp.unix.osf.osf1,comp.lang.fortran,comp.sys.hp Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!darwin.sura.net!news.udel.edu!perelandra.cms.udel.edu!mccalpin From: mccalpin@perelandra.cms.udel.edu (John D. McCalpin) Subject: Re: Summary: Alpha Performance Message-ID: Sender: usenet@news.udel.edu Nntp-Posting-Host: perelandra.cms.udel.edu Organization: College of Marine Studies, U. Del. References: <20clhd$qls@sol.TIS.COM> <1993Jun24.144119.1@uwovax.uwo.ca> <20d2e7$845@sol.TIS.COM> Date: Thu, 24 Jun 1993 21:35:30 GMT In article <20d2e7$845@sol.TIS.COM> mjr@tis.com (Marcus J Ranum) writes: >[...], 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. It is a very clear indication that the "benchmark" was not a real application, and SPEC got bit by this one. MATRIX300 has two characteristics that make it a bad benchmark code. First, it has a single hot spot -- indeed, the single hot spot is the entire code. Second, the hot spot was coded in a strikingly poor manner. People who do numerical linear algebra have known for at least a decade that the coding in MATRIX300 is a dumb way to do matrix multiplication. In fact, MATRIX300 goes out of its way in being dumb, by doing a matrix multiplication using a subroutine SGEMM, which does the same thing as the standard BLAS3 routine, but with a different calling sequence. The obvious way of writing matrix multiply as a triply nested loop would have been much more efficient on most machines, as well as significantly shorter! Instead, the MATRIX300 code writes the Matrix-Matrix product (SGEMM) as a loop of calls to a Matrix-Vector product subroutine (SGEMV), which is in turn written as a loop of calls to a vector-vector product subroutine (SAXPY). Structured programming at its silliest? If MATRIX300 were a real application, it would have taken all of 10 minutes to replace the SGEMM call with a call to the vendor's hand-optimized matrix multiply code, and the entire code would be reduced to a series of calls to the vendors library routine. The code that is present in MATRIX300 should be considered as a "last-resort" hacked-together code for portability to those systems which do not have a vendor-supplied matrix multiplication routine. The performance of the vendors hand-coded matrix multiplication routine is not a very interesting benchmark by itself because it provides essentially no information that is not already provided by the LINPACK 1000x1000 results. (The performance characteristics of Gaussian elimination and matrix multiply are essentially identical on uniprocessors, though the matrix multiply is perhaps a bit easier to code). -- -- John D. McCalpin mccalpin@perelandra.cms.udel.edu Assistant Professor mccalpin@brahms.udel.edu College of Marine Studies, U. Del. John.McCalpin@mvs.udel.edu