Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mit-eddie.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!mit-eddie!barmar From: barmar@mit-eddie.UUCP (Barry Margolin) Newsgroups: net.arch,net.ai,net.lang,net.lang.lisp Subject: Re: Lisp Machines Message-ID: <4314@mit-eddie.UUCP> Date: Mon, 20-May-85 23:28:08 EDT Article-I.D.: mit-eddi.4314 Posted: Mon May 20 23:28:08 1985 Date-Received: Wed, 22-May-85 01:12:55 EDT References: <922@noscvax.UUCP> <5604@utzoo.UUCP> <3345@utah-cs.UUCP> Reply-To: barmar@mit-eddie.UUCP (Barry Margolin) Organization: MIT, Cambridge, MA Lines: 43 Xref: watmath net.arch:1224 net.ai:2775 net.lang:1578 net.lang.lisp:451 In article <3345@utah-cs.UUCP> shebs@utah-cs.UUCP (Stanley shebs) writes: >... Compiled PSL code wins >big because it sacrifices some reliability and debuggability of code >for speed. Also, to get the best performance, one must use several >kinds of declarations and flags. The net effect is to compile away >a large percentage of function calls and type checks. But Lisp Machines provide all the type checking WITHOUT sacrificing efficiency. For instance, the hardware that implements the "+" function on a Symbolics 3600 does all the following things IN PARALLEL: 1) Direct the top two items on the stack to the fixed-point addition circuit. 2) Direct the top two items on the stack to the floating-point addition unit. 3) Check the type bits of the top two items on the stack. If they are both fixna then the result of (1) will be used; if they are both flonums then the result of (2) will be used as the result; and in any other case an exception will be generated, and the addition will be performed by appropriate microcode routines. The point is that on a Lisp Machine you don't sacrifice any type checking in order to get optimal performance. If you are adding two fixna then it takes just as long as a fixed point addition instruction on any other machine. In order to get all the checking that the Lisp Machine implements on conventional hardware you would have to slow down the code for "+" by a factor of two or three; for this reason, most Lisp cmpilers for conventional machines don't generate type checking code, and users must use the interpreter to get this checking. Most Lisp Machine programmers I know do all their debugging on compiled code, which would be unthinkable on most other systems. Another place where special hardware can be a big win is in garbage collection. I won't go into details here; see the paper titled something like "Garbage Collection in Large Address Spaces", by David Moon of Symbolics, in the Proceedings of the 1984 ACM Symposium on Lisp and Functional Programming. -- Barry Margolin ARPA: barmar@MIT-Multics UUCP: ..!genrad!mit-eddie!barmar