dynamic (meta-)objects created at run-time in LISP. This
means that it is actually impossible to compare exclusively
either language, or compiler performance. This also means
that given the inherent expressiveness of LISP and CLOS in
particular, compilers have to be even smarter to reach the
efficiency level of C++, and this is really good news for the
LISP community.
One dark point remains on the LISP side though. Our
study exhibited extremely divergent behaviors with respect
to slot initform type checking (and probably slot type check-
ing in general), in particular when safety is (supposed to be)
preferred over speed. Some compilers never perform any
type checking, some always do (even in optimized mode),
but then, on structures and not on classes, some others adhere
to a consistent principle, except when bugs come and contra-
dict those principles. We think it is a pity that the COMMON-
LISP standard leaves so much freedom to the implementa-
tion, as it leads to very different behaviors across implemen-
tations, and even inconsistencies within a particular imple-
mentation. Admittedly, if one considers a class mainly as a
storage facility (which is reasonable, given the fact that be-
havior is not encapsulated in classes in CLOS), type check-
ing is not a critical feature because type errors will be caught
later on, at the time a slot’s value is actually used. Never-
theless, it would not hurt to be informed sooner of a typing
error, and would make debugging easier.
7. Perspectives
The perspectives of this work are numerous. We would like
to emphasize on the ones we think are the most important.
7.1 Further Investigation
The research described in this paper is still ongoing. In par-
ticular, we have outlined several oddities or surprising be-
haviors in some particular aspects of the instantiation pro-
cess. Some of these oddities have been reported to the con-
cerned maintainers; some of them have even already been
fixed or are being worked on right now. Some others should
be further analyzed, as they probably would reveal room for
improvement in the compilers.
7.2 Structures as classes
Although not part of the ANSI COMMON-LISP standard,
some implementations provide a certain degree of unifica-
tion between structures and CLOS (for instance, accessing
structure slots with slot-value). These features have not
been tested at all, but it should be interesting to see how they
behave.
7.3 Memory Management
GC timings were intentionally left out of this study because
our focus was on the object-oriented layer. When compar-
ing so different languages however, it is difficult to avoid
taking into account the differences of expressiveness, and in
that particular matter, the fact that memory management is
automatic on one side, and manual on the other side. Even
within the LISP side, it would be interesting to include GC
timings in the benchmarks, simply because GC is part of the
language design, and also because different compilers use
different GC techniques which adds even more parameters
to the overall efficiency of one’s application.
7.4 Benchmarking other compilers / architectures
The benchmarks presented in this paper were obtained on
a specific platform, with specific compilers. It would be in-
teresting to measure the behavior and performance of the
same code on other platforms, and also with other compil-
ers. The automated benchmarking infrastructure provided in
the source code should make this process easier for people
willing to do so.
This is also the place where it would be interesting to
measure the impact of compiler-specific optimization capa-
bilities, including architecture-aware ones like the presence
of SIMD (Single Instruction, Multiple Data) instruction sets.
One should note however that this leads to comparing com-
pilers more than languages, and that the performance gain
from such optimizations would be very dependent on the al-
gorithms under experimentation (thus, it would be difficult
to draw a general conclusion).
7.5 From dedication to genericity
In Verna (2006), we provided a series of micro-benchmarks
on several simple image processing algorithms, in order to
evaluate the performance of pixel access and arithmetic op-
erations in both C and LISP. We demonstrated that the be-
havior of equivalent LISP and C code is similar with respect
to the choice of data structures and types, and also to ex-
ternal parameters such as hardware optimization. We further
demonstrated that properly typed and optimized LISP code
runs as fast as the equivalent C code, or even faster in some
cases. That work was the first step in order to get C or C++
people’s attention. However, most image treaters want some
degree of genericity: genericity on the image types (RGB,
Gray level etc.), image representation (integers, unsigned,
floats, 16bits, 32bits etc.), and why not on the algorithms
themselves. To this aim, the object oriented approach is a
natural way to go. Image processing libraries with a variable
degree of genericity exist both in C++ and in LISP, using
CLOS. The research presented in this paper is the first step
in evaluating the efficiency of the COMMON-LISP object-
oriented layer. The next two steps will be to respectively
evaluate the performance of slot access, and then generic
dispatch in general. Given the optimistic note on which this
paper ends, we are eager to discover how LISP will compare
to C++ in those matters.
7.6 From dynamic to static genericity
Even in the C++ community, some people feel that the cost
of dynamic genericity is too high. Provided with enough ex-