[Openmcl-devel] Quick HW question...

Tim Bradshaw tfb at tfeb.org
Wed Nov 17 09:32:38 UTC 2010


On 16 Nov 2010, at 18:30, Spires, Shannon V wrote:

> But how do you even write clever cache-aware code in Lisp? Lisp is a pointer-following language with garbage collection; Lisp data is a dynamic graph where the nodes point all over the place and are constantly moving around. A C program is more like one big node: Its data is all in one place and it doesn't move around. Modern cache architectures were built with C-like programs in mind; they're hell for Lisp.

I suspect things are much more complex than this.  Big C systems are typically doing some kind of semi-automated storage management which is either relocating things, reference counting (or perhaps some non-relocating GC), and hence chasing pointers all over the place.  Relocating garbage collectors can move things so they are close together and hence improve locality, unlike systems which don't relocate and often end up with hugely fragmented heaps.

And finally, there's another language which looks in many ways a bit like Lisp (it's garbage-collected, lots of things are pointers): Java.  There's a lot of Java out there, and the markets for it are such that I guess system-design people pay attention to performance issues.  What benefits java benefits Lisp to a great extent.

Uniform memory access speed is not going to happen.


More information about the Openmcl-devel mailing list