Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!rochester!pt.cs.cmu.edu!wb1.cs.cmu.edu!ram From: ram@wb1.cs.cmu.edu (Rob MacLachlan) Newsgroups: comp.arch Subject: Workstations for Lisp (was Re: DECStation vs. SPARCstation, need help!) Message-ID: <5187@pt.cs.cmu.edu> Date: 11 Jun 89 14:29:21 GMT References: <486@unipas.fmi.uni-passau.de> Organization: Carnegie-Mellon University, CS/RI Lines: 74 I am a Lisp systems programmer for the CMU Common Lisp project. I am currently working on a new Common Lisp compiler. I have several comments to make about evaluating a system for Lisp, but I generally won't come down on one side or the other of the SPARC/MIPS question, since I really don't know the important system details. The first thing I will say, and I believe the most important is *consider the non-processor issues*. I say this up front, since I suspect this sort of thing will get short shrift in the following flamage. The biggest determinant of performance of many Lisp systems is memory system performance: -- How much memory can you put in? If not 16 meg+, forget it for serious work. -- How much memory can you afford to put in? -- How fast are the disks? Even with lots of memory you will page. -- How big is the cache? As to the specific RISC v.s. CISC question for Lisp, I strongly favor a RISC approach. In addition to the usual RISC arguments, there are several Lisp specific factor that favor RISC: -- Complex addressing modes are difficult or impossible to use due to the way Lisp data structures are laid out (with indirections everywhere.) -- Complex call instructions not designed for Lisp are rarely useful for Lisp. Generally Lisp call sequences for CISCs ignore hairy call features and use multiple simple instructions. The general idea is that the complex features of widely available CISC architectures aren't designed to support Lisp, and therefore are rarely useful for Lisp. You end up using the subset of the instruction set that resembles a RISC. As to SPARC v.s. MIPS: Pro SPARC: -- Has special tagged +/- instructions for short integer arithmetic. This can speed up these operations in the absence of appropriate FIXNUM declarations. Integer arithmetic is important in many (but not all) symbolic applications for vector indices, loop counter counters, etc. Even if your program doesn't uses integers much, the underlying Lisp run-time system uses them for things such as I/O, hashtables, etc. Of course, the system code *should* have the right declarations, so tagged operations shouldn't have a big affect on system performance. -- Has register windows, which *potentially* are a win for Lisp call/return, since the main competing technology (global register allocation) works poorly with Lisp's run-time function linkage. In practice, I don't know how well SPARC's windows mesh with Lisp call-sequence requirements. Pro MIPS: -- Has lots of registers, so: - It is easier to sucessfully allocate locals in registers. - Important globals of the run-time system can be kept in registers. A Lisp system may have three stack pointers, several heap pointers, a couple registers for frame pointers, etc. I am primarily a compiler writer, so perhaps it is not surprising that I somewhat favor MIPS: it gives me more room (registers) to play with, without preempting any design decisions. Also, I am interested in global register allocation algorithms and "block compilation" of programs (resolving function references at compile time). On the other hand, if I were desiging an architecture for Lisp, I would certainly make checked fixnum arithmetic "free", and I would also seriously consider using register windows. Note that I am not convinced register windows are necassarily a good thing for Lisp. Studies of non-Lisp program performance are not very relevant, since Lisp functions are clearly statistically different in some ways: -- Functions tend to be smaller. -- Recursion is more common. I suspect that small or variable-sized windows would be a win for Lisp. Rob --