From: Juergen Kopp
Subject: MCS: A portable object system for Common Lisp
Date: 
Message-ID: <5048@gmdzi.gmd.de>
The Meta Class System (MCS) is a portable object-oriented extension
of Common Lisp. MCS is highly efficient and integrates the
functionality of CLOS, the Common Lisp Object System, and TELOS, the
object system of LeLisp Version 16 and EULISP. Additionally, MCS
provides a metaobject protocol which the user can specialize.

MCS has been used successfully for the development of the commercial
software product babylon: an expert system development workbench
including a hybrid knowledge representation language and many tools
like editors, browsers, etc. Based on experiences made with building
such a large and complex software system, MCS has been improved on
abstract classes and mixin classes to support a better style of
object-oriented modelling. Furthermore, these improvements allow
significant internal optimizations.

MCS is more efficient in time and space than comparable systems we
know, including commercial CLOS implementations.
It runs on any Common Lisp implementation; its source code requires
321 KB, the binaries for Macintosh Allegro Common Lisp need ca. 330
KB, for Allegro Common Lisp on a Sun SPARC-Station ca. 530 KB, and
for Lucid Common Lisp on a Sun SPARC-Station ca. 500 KB.

The sources and documentation of MCS are available as freeware via
anonymous FTP from host gmdzi.gmd.de (IP address: 129.26.1.90) in
the directory /pub/lisp/mcs .

------------
Harry Bretthauer
Juergen Kopp
  German National Research Center for Computer Science (GMD)
  Expert System Research Group
  P.O. Box 1240, D-5205 Sankt Augustin 1, FRG
  email: ····@gmdzi.gmd.de

-- 
Juergen Kopp
  German National Research Center for Computer Science (GMD)
  P.O. Box 1240, D-5205 Sankt Augustin 1, FRG
  email: ····@gmdzi.gmd.de, phone: (++49 2241) 14-2679

From: John Carroll
Subject: Re: MCS: A portable object system for Common Lisp
Date: 
Message-ID: <1991Jul3.161054.21922@cl.cam.ac.uk>
In article <····@gmdzi.gmd.de> ····@gmdzi.gmd.de (Juergen Kopp) writes:
>The Meta Class System (MCS) is a portable object-oriented extension
>of Common Lisp. MCS is highly efficient and integrates the
>functionality of CLOS, the Common Lisp Object System, and TELOS
>...
>MCS is more efficient in time and space than comparable systems we
>know, including commercial CLOS implementations.
>...

I was somewhat surprised at this claim, considering that commercial CLOS
implementations are able to take advantage of internal compiler hooks,
knowledge of stack frame contents etc.

So I thought I'd test it out using Procyon CL. I FTPed version 1.3.1 of
MCS (dated 18.06.91), built it on top of a vanilla Procyon CL system
and compared it with native Procyon CLOS on a very small benchmark (yes,
I know they can be misleading but anyway...). The benchmark tests generic
function dispatch, call-next-method, :before, :after and :around methods.

Results (on a Mac IIci, CPU time and garbage generated)

MCS (v1.3.1 / Procyon CL 2.1.4):    0.10 sec, 3200 bytes
Procyon CLOS (2.1.4) :              0.10 sec, 0 bytes

So although MCS might be more efficient than some CLOS implementations,
it looks as though it's on a par with others. However, a point against it
is that it isn't full CLOS (e.g. call-next-method cannot take arguments,
only standard method combination is supported, no &optional or &key
arguments allowed in method lambda lists etc.)

On a more positive note, though, I'm sure MCS will be useful for people
with CL implementations which do not include a built-in CLOS - despite
what I've just said it is really does seem to be fairly efficient.

John Carroll

(···@cl.cam.ac.uk)
University of Cambridge Computer Lab
Pemproke Street
Cambridge CB2 3QG, UK

------
;;; Benchmark - compile and load it then execute the 'time' form

(defgeneric rec (x))

(defmethod rec ((x number))
;   (format t "Method 1~%")
   (next-method-p)
   x)

(defmethod rec ((x integer))
;   (format t "Method 2~%")
   (when (> x 0)
      (rec (1- x))
      (call-next-method)))

(defmethod rec :around ((x t))
;   (format t "Method around~%")
   (call-next-method))
   
(defmethod rec :before ((x t))
;   (format t "Method before~%")
   )
(defmethod rec :after ((x t))
;   (format t "Method after~%")
   )

(time (dotimes (i 100) (rec 3)))
From: Michael Wirth
Subject: Re: MCS: A portable object system for Common Lisp
Date: 
Message-ID: <1991Jul5.165804.15703@rice.edu>
In article <····@gmdzi.gmd.de> ····@gmdzi.gmd.de (Juergen Kopp) writes:
>The Meta Class System (MCS) is a portable object-oriented extension
>of Common Lisp. MCS is highly efficient and integrates the
>functionality of CLOS, the Common Lisp Object System, and TELOS
>...
>MCS is more efficient in time and space than comparable systems we
>know, including commercial CLOS implementations.
>...

To which John Carroll (···@cl.cam.ac.uk) replied:
>I was somewhat surprised at this claim, considering that commercial CLOS
>implementations are able to take advantage of internal compiler hooks,
>knowledge of stack frame contents etc.

>So I thought I'd test it out using Procyon CL. ...

>Results (on a Mac IIci, CPU time and garbage generated)

>MCS (v1.3.1 / Procyon CL 2.1.4):    0.100 sec, 3200 bytes
>Procyon CLOS (2.1.4) :              0.100 sec, 0 bytes

I ran John Carroll's benchmark test, also on a Mac IIci (with and without a
Micron Technologies cache card), but using Apple's Macintosh Common Lisp 2.0
beta 1 patch 3, with its native CLOS.  Here are my results:

MCL 2.0b1p3 (cache card off)         0.072 sec (per 100 repetitions)
MCL 2.0b1p3 (cache card on)          0.039 sec (85% faster!)

Notes:  I used 10,000 repetitions, run multiple times, to get accurate answers.
On the first run only, 184 bytes of memory were allocated, thereafter zero.
John Carroll, did you use a cache card?

Mike Wirth
Petroleum Information Corp.
Houston, Texas
713-627-7180
713-963-0085 (fax)
···@rice.edu
From: John Carroll
Subject: Re: MCS: A portable object system for Common Lisp
Date: 
Message-ID: <1991Jul8.111023.4558@cl.cam.ac.uk>
In article <····@gmdzi.gmd.de> ····@gmdzi.gmd.de (Juergen Kopp) writes:
>...
>MCS is more efficient in time and space than comparable systems we
>know, including commercial CLOS implementations.
>...

To which John Carroll (···@cl.cam.ac.uk) replied:
>
>Results (on a Mac IIci, CPU time and garbage generated)
>
>MCS (v1.3.1 / Procyon CL 2.1.4):    0.100 sec, 3200 bytes
>Procyon CLOS (2.1.4) :              0.100 sec, 0 bytes

In article <·····················@rice.edu> ···@titan.rice.edu (Michael Wirth) writes:
>I ran John Carroll's benchmark test, also on a Mac IIci (with and without a
>Micron Technologies cache card), but using Apple's Macintosh Common Lisp 2.0
>beta 1 patch 3, with its native CLOS.  Here are my results:
>
>MCL 2.0b1p3 (cache card off)         0.072 sec (per 100 repetitions)
>MCL 2.0b1p3 (cache card on)          0.039 sec (85% faster!)
>
>...
>On the first run only, 184 bytes of memory were allocated, thereafter zero.
>John Carroll, did you use a cache card?


No, I didn't use a cache card, but I think I'll investigate getting one
on the strength of your results!

The new MCL native CLOS looks speedy; Procyon's CLOS is getting relatively
old now - released 2 years ago. (However, looking forward to getting a new
version in the autumn with the full Metaobject Protocol.)

John Carroll
(···@cl.cam.uc.uk)