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

mac scheme implementations



SIOD will run on the Mac, probably with a little modification for
Lightspeed C. anonymous ftp to bu.edu and cd to src/gjc and get
siod-v2.3-shar

Note on interpreters: I tried SABER-C on a SUN-4 with SLIB.C compiled
and SIOD.C interpreted. By running (standard-fib 15) vs. (cfib 15) we
can then test the scheme interpreter speed vs the SABER-C interpreter
speed. Here is the code:

(define (standard-fib x)
  (if (< x 2)
       x
      (+ (standard-fib (- x 1))
         (standard-fib (- x 2)))))  


LISP cfib(x)
     LISP x;
{if NNULLP(lessp(x,my_two))
   return(x);
 else
   return(plus(cfib(difference(x,my_one)),
	       cfib(difference(x,my_two))));}


RESULT: The scheme interpreter is more than 10 times faster (takes less than
        1/10'th the time to compute fib(15)) than the SABER-C interpreter.

-gjc