Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.micro.68k,net.arch Subject: Re: Re: RISC Message-ID: <2351@sun.uucp> Date: Wed, 26-Jun-85 04:54:49 EDT Article-I.D.: sun.2351 Posted: Wed Jun 26 04:54:49 1985 Date-Received: Fri, 28-Jun-85 11:43:29 EDT References: <639@vax2.fluke.UUCP> <2743@nsc.UUCP> Organization: Sun Microsystems, Inc. Lines: 36 Xref: watmath net.micro.68k:971 net.arch:1492 > > > > Also, multiplies are actually fairly infrequent operations in most > > > > programs. > > > > > > That is, if "most programs" don't use multidimensional arrays... > > > > Except in a few specific environments, most programs indeed do not use > > multidimensional arrays. > > Perhaps we could do without the integer multiplier :-), but we had better > not drop the floating point adder and multiplier, and they had both better > operate at one op per clock after filling the pipeline. Methinks "most" is in the eye of the beholder. Most UNIX utilities, and the UNIX kernel, do relatively few multiplications *or* floating point operations (the kernel need not do any; the 4.2BSD scheduler does, but the Sun 4.2BSD scheduler and the 2.9BSD scheduler, which have the same load-average dependent decay on the average weighting for "p_cpu", don't) and rarely use multidimensional arrays. The same is probably true for many other classes of applications, such as the office automation/"personal productivity" applications popular on PCs, for instance. However, I suspect a scientific programmer would answer differently. I used multidimensional arrays in scientific programs I've written; they are quite common in such programs (they are a natural data structure for many types of calculations, like those which use models of two-dimensional or three-dimensional spaces). Those programs also would like the FP adder and multiplier; I don't know how many integer multiplies or divides they do, other than in support of accesses to multi-dimensional arrays. In the case of such accesses, if the indices being used are linear functions of the induction variable of a loop (I don't know whether there are any looser conditions possible), a strength reduction can make the multiplications unnecessary (C programmers may know this trick as "using a pointer instead of an array subscript"). Guy Harris