Hacker News new | ask | show | jobs
by jesnell 6022 days ago
SBCL's low level code generation is total crap, the smart bits are in the high level optimizations. (And to be honest, even those smart bits are fundamentally 80s technology, it's just that most dynamic language implementations never got even that far up the technology ladder). What James is doing is hooking LLVM in after most of those high level optimizations have been done, but letting LLVM worry about instruction selection, instruction reordering, register allocation, etc.

(Edit: Oh, but the place where it's hooked into also is bypassing some compiler passes that might turn out to be too fundamental, like representation selection which decides whether values should be stored tagged or as raw machine values. One theory is that some of LLVM's more advanced or future optimizations will obviate the need for that pass. The other is that really LLVM should work at the same level as other SBCL backends, after all the generic low level decisions have been made. This work is still at such an early stage that we haven't even figured out which of the two theories is true.)

1 comments

Does it finally not crash on Windows yet? Because I'd love to mess around with it, but it's hard to make a game when it occasionally crashes deep within SBCL's internals.
Nobody is working on SBCL on Windows.
And thats why I'm using clojure.