Monday, February 14

LISP Software Renderer RIP

I gave up on my quest to write a software renderer in Lisp - I got as far as creating nice antialiased clipped lines, but was driven to the conclusion that the only sane language for such a beast is assembler...even C doesn't get quite close enough to the metal without generous helpings of inline assembler - which kind of misses the point..

I did discover that a LISP compiler with a decent static type system, vectorisation, SSE/SIMD support, and inline assembler could do just about as good a job as C. Trouble is, there's no LISP system like that in existence. There's at least two good open source Lisps that could be persuaded to do it, though..


Anonymous said...

Some lisps, notably cmucl and sbcl, have inline assemblers. As always, in nice S-expr notation, so you can do all the usual macrology/code generation thing, and keep the real assembly to the minimum.

John Connors said...

Yes, I've looked @ SBCL & CMUCL, and the way they use VOP as inline asm is nice.

But they don't support SSE & MMX instruction sets, and don't align memory to 16 byte bondaries, or have any way of doing I can't get the absolute best speed out of my renderer without resorting to FFI.

Pity..unless I patch in an SSE/MMX/x86 assembler app to UFFI..