3 ms·
> Are there elaborate explanations on why we get near-machine code speed for compiled SBCL Lisp But not for CLOS code. CLOS is a subset of Common Lisp and it a
by lispm 4y ago
> Are there elaborate explanations on why we get near-machine code speed for compiled SBCL Lisp
But not for CLOS code. CLOS is a subset of Common Lisp and it addresses flexibility, expressiveness, runtime dynamics AND decent speed. But fully dynamic CLOS code (with added meta-level) will not be 'machine level' speed.
See Julia for a more recent approach to multimethods and performance. There are also CLOS optimizations in the past and some newer approaches -> but these usually lead to less runtime dynamics.
- nemoniac 4y agoI usually start a programming task CLOS by taking advantage of its flexibility,expressiveness and runtime dynamics. Then when I've got a better grasp of the structure of the task, I start to restrict that flexibility by using inlined generics and the like to get more speed. Much in the same way as I program Lisp in general, first getting the shape of the task and then honing it by adding type declarations gradually.
- lispm 4y agofinalize the classes in some implementations -> fixed class layout -> faster slot access Training CLOS caches. There are attempts to improve Generic Function performance, especially for the SBCL implementation. ...