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

Re: MCL and Apps



In article <4AF1A26102@urz-mail.urz.uni-heidelberg.de>,
TWEBER@urz-mail.urz.uni-heidelberg.de (thorsten weber) wrote:

> Hello,
> as Common Lisp-programmer with about three years of experience and 
> now as new-comer on the Mac, I've got two simple (maybe stupid) 
> questions about Apple's implementation of Common Lisp, the so-called 
> MCL: 
> First, could I build standalones using MCL and, if yes, how big, 
> fast, ... are these executables ?

Yes you can write stand alone, double clickable applications in MCL. 

They are big. For example, a simple application with one menu that creates
a window and quits is 1.6Mb.

They can be fast if you optimize your code. Simply adding declarations
helps a lot:. Consider on a 33MHz 68030:

(defun silly-program ()
  (let ((total 0))
    (dotimes (i 100000)
      (setq total (+ total i)))
    total))
(time (silly-program))
(SILLY-PROGRAM) took 7431 milliseconds (7.431 seconds) to run.

The same thing with declarations:
(defun smart-program () 
  (let ((total 0))
    (declare (fixnum total))
    (dotimes (i 100000)
      (declare (fixnum i))
      (setq total (+ total i)))
    total))
(time smart-program ())
(SMART-PROGRAM) took 111 milliseconds (0.111 seconds) to run.

A similar program I tested in Think C takes 0.3 seconds.

> Second, is there a life for MCL beyond Dylan ?

Yes. Apple sold MCL to a company who has committed to a native PowerMac
version of MCL.