4 ms·
Seriously asking, for this code example (I don't have enough CL experience to tell from this sample): are these optimizations at least generally CL specific, or
by nnq 14y ago
Seriously asking, for this code example (I don't have enough CL experience to tell from this sample): are these optimizations at least generally CL specific, or are they tailored to SBCL specifically? would the same performance benefits apply to Clozure CL or to a bytecode compiled variant like CLISP?
- ced 14y agoI've been coding with SBCL and Common Lisp for years, and the general optimization strategy is great. With compiler hints (standard in Common Lisp), you can really help the optimizer, and locally vary the speed/safety trade-offs (eg. bound checking). I don't think I would ever write something like the code linked above. Half of it is not standard Common Lisp, and not even part of SBCL's official extensions. At that level, you could write custom assembly, which kinda defeats the point of having a language shout-out IMO.
- nnq 14y agoyeah, and the performance is still on par with the Java code, so whoever submitted that SBCL optimized code to be showed alongside the Java and Scala examples ended up proving how well engineered the JVM is, compared to state of the art CL compilers, or maybe how efficent JIT can be in general :) ...though I'd love to see an ABCL example for comparison