Skip to content

Bending the CLOS Mop for Java-Style Single Dispatch

atgreen.github.io
8 pointsatgreen2 comments
On HN

Comments

I managed to get a clojure REPL running on Common Lisp (SBCL) via OpenLDK, my Java JIT compiler and runtime on Common Lisp. This blog post gives an overview on how I manipulated CLOS's method dispatch to improve performance for single-dispatch methods calls.

Interesting! I wrote a Smalltalk in CL last year that did the same kind of mapping: Smalltalk classes compile to CLOS classes and every message is a CLOS method. Worked great at the start and then performance dropped off as more classes compiled.

I never took the time to get that sorted out but it smells suspiciously similar to what you described here. Thanks for the write up!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.