Path: utzoo!utgpu!attcan!uunet!munnari!otc!metro!ipso!stcns3!stca77!peter From: peter@stca77.stc.oz (Peter Jeremy) Newsgroups: comp.arch Subject: Re: Benchmarking Message-ID: <319@stca77.stc.oz> Date: 19 Oct 88 21:46:48 GMT References: <2220003@hpausla.HP.COM> <46500026@uxe.cso.uiuc.edu> <6683@nsc.nsc.com> <6684@nsc.nsc.com> <4263@wright.mips.COM> <6729@nsc.nsc.com> <10498@reed.UUCP> <4655@winchester.mips.COM> <6868@nsc.nsc.com> <1710@eos.UUCP> Reply-To: peter@stca77.stc.oz (Peter Jeremy) Organization: Alcatel-STC, Alexandria, AUSTRALIA Lines: 38 In article <1710@eos.UUCP> eugene@eos.UUCP (Eugene Miya) writes: >In article <6868@nsc.nsc.com> grenley@nsc.nsc.com.UUCP (George Grenley) writes: >>... (I heard once that a Fortran compiler was released >>which SPECIFICALLY checked the soruce to see if it was Whet, and if it was, >>stuck in a VERY fast routine). > >I checked this story out (months ago) . Without mentioning specific >names within a VERY large computer company I discovered it was an >APL compiler not a Fortran compiler. The benchmark was a simple >Gaussian sum (3 APL characters). The benchmark adds 1 thru n, the compiler >did what Gauss did: you know n(n+1)/2. It was placed there by the compiler >writer who knew the person in the APL community who did this as a >benchmark. Serves the benchmarker right. Presumably the benchmark was +/{iota}n. At least one APL _interpreter_ that I am aware of (IBM VSAPL) has an internal representation format designed to efficiently handle arithmetic progression vectors. All it stores is the tag, number of elements, value of first element and increment. This makes simple arithmetic and indexing into and by the array very efficient. Whether the extra code in the interpreter necessary to support this 'type' is justified on typical applications, or whether it was just put in for sales reasons, I don't know. Given that this is documented (in the manual on writing VSAPL Auxiliary Processors), it is hardly a great secret. For that matter +/{itoa}n is hardly a great benchmark. I far prefer things like {domino}?100 100{rho}1E6, it might not be a good benchmark, but its sure good for soaking up CPU time (and sure beats trying to do it in any other language :-). And whilst the rumour mill is running: Rumour has it that at least one PClown C compiler recognizes the Sieve of Eratosthenes Benchmark (so beloved by BYTE magazine) and spits out special code, or at least the optimiser was written with the Sieve in mind. -- Peter Jeremy (VK2PJ) peter@stca77.stc.oz Alcatel-STC Australia ...!munnari!stca77.stc.oz!peter 41 Mandible St peter%stca77.stc.oz@uunet.UU.NET ALEXANDRIA NSW 2015