Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is one things I like so much about SBCL, it not only compiles the Lisp code directly to native code, with the disassemble function you can print out the generated code for each function to see how much the compiler was able to optimize a function. This is especially important in the context of dynamic languages to see where generic operators have to be called and where the type inferencer was able to compile it into an assembly instruction like integer multiplication.


Many Lisp compilers do that.

What makes SBCL special is a) using type information as compile-time assertions and b) the level of diagnostic output during compilation. The compiler explains in detail when operations can't be optimized further, for example because of lack of type information.


Well, yes. How SBCL uses the type annotations as well as type inferencing to completely eliminate type checking throughout sections of code and generating highly efficient assembly code makes looking at the assembly output of SBCL especially interesting to look at. It gives you good feedback whether your type annotations had the desired optimization outcomes. I didn't want to indicate that other Lisp implementations wouldn't offer native compilation or a disassemble function.


Many implementations also give us type inferencing and optimizations, but usually not compile time type checking like in SBCL. I would also kind of think that the level of type inferencing in SBCL is greater.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: