Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site harvard.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!genrad!panda!talcott!harvard!reiter From: reiter@harvard.UUCP (Ehud Reiter) Newsgroups: net.arch Subject: Re: VAX polyd instruction Message-ID: <759@harvard.UUCP> Date: Wed, 5-Mar-86 10:52:04 EST Article-I.D.: harvard.759 Posted: Wed Mar 5 10:52:04 1986 Date-Received: Fri, 7-Mar-86 07:49:13 EST References: <946@garfield.UUCP> <1417@sdcsvax.UUCP> <6777@boring.UUCP> <1476@lanl.ARPA> <78@cad.UUCP> Reply-To: reiter@harvard.UUCP (Ehud reiter) Organization: Aiken Comp Lab, Harvard Lines: 23 Keywords: RISC, optimiser, compiler Summary: POLYD and Trig Functions In the various RISC vs CISC debates, the VAX POLYD instruction has often been pointed out as the "archtype" of a bad instruction - inefficient and difficult for compilers to handle. Now, in article <78@cad.UUCP>, Richard Rudell (rudell@cad.UUCP) points out that "common knowledge" to the contrary, his tests show that the VAX POLYD instruction is faster even than unrolled assembly language. The point I wish to make is that it is irrelevant that the POLYD instruction is difficult for compilers to handle, because its main purpose was to speed up evaluation of mathematical functions (SIN, EXP, LOG, etc.), which nearly always come down to evaluating an approximation polynomial (see H. Levy and R. Eckhouse, COMPUTER PROGRAMMING AND ARCHITECTURE: THE VAX-11 (Digital Press), pg 167). Therefore, the intended "user" of the POLYD instruction was the run time library system, not compiled code. Of course, one can argue that the best way to speed up trig functions is not with a polynomial evaluation instruction, but rather by hard coding the trig functions directly in the floating point unit (some of the new floating point chips, like the 80287, seem to be moving in this direction), but if RISC types get upset at POLYD, they must really hate the thought of primitive instructions for SIN, ATAN, etc. Ehud Reiter reiter@harvard.ARPA ...seismo!harvard!reiter.UUCP