[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Common Lisp for SUNS



Regarding benchmarking Lisps.
	
1. Declarations are important for speed, but you'll find that some
   Lisps will require more specific declarations than others.
   For example Sun's Lisp  only supports one floating point type so declaring
   something to be a 'float' is sufficient for the compiler to open code
   the operation. Allegro supports two types of floats so you must declare
   either 'single-float' or 'double-float.'

2. Different systems do different amounts of optimizations based on
   the settings of the optimization parameters speed, safety and size.
   Probably the only comparable values are for speed=3, safety=0, size=0
   where each system does maximum optimization.  While benchmarks
   run at this value are interesting you probably aren't going to
   do development with these settings since you aren't going to get
   good diagnostics.


Regarding the Lisp on the Sun4.

   Allegro is highly optimized for the Sun4 but you have to
   add some declarations and specify that speed is important.
   The comment was made that a C based Lisp on the Sun4 would
   be very fast because of sun's optimizing C compiler.
   While it is true that by using C you can take advantage of that
   compiler, it is also true that the use of C constrains your
   whole system design so you can't use the machine optimally.
   I say this from many years experience programming in C parts of the
   kernel of Franz Lisp.  To cite two examples for the Sun4:
   
   One of the nicest features of the sun4 (sparc) architecture
   is the support the the Lisp fixnum data type (there are 'tagged'
   versions of the add, subtract and compare instructions).
   This allows the compiler to open code +,-,<,<=.. and so on
   and if the operands happen to be fixnums (they very often are)
   then the operation and fixnum tag check can go on in parallel.
   This makes for fast computation in the typical case
   and it is completely safe (if the tags aren't fixnum you find out
   about it and perform the appropriate operation for the
   actual data types).
   A C based lisp can't make use of these tagged instructions.
   
   The Sun4 has 7 global registers.  Allegro stores nil and a
   pointer to our global function table in one of them, and
   uses another for tracking asychronous interrupts. Another
   is used to pass argument/result counts.  C doesn't permit
   global register declarations so you can't take advantage
   of this nice feature of the Sun4 in a C-based Lisp.
   [The use of machine registers to hold certain values was
   so important in Franz Lisp that for certain  regular
   architectures (e.g. vax) an incredible hack was written
   by Keith Sklower to modify the assembler language coming
   out of the C compiler to change certain memory references
   to register references and to fix the register save masks.]
   




-- John Foderaro
   Franz Inc.

   jkf%franz.uucp@berkeley.edu