‹Programming› 2022
Mon 11 - Thu 14 April 2022
Mon 21 Mar 2022 15:30 - 16:00 at Auditorium Nobre - ELS IV

Lisp is the second oldest programming language, and the first one to value productivity more than raw execution speed. This initial disregard for performance has indeed led to some mind-bogglingly slow implementations, especially in the early days, but modern Lisp compilers such as SBCL have almost fully closed the performance gap to the fastest imperative programming languages. Almost, but not quite: Until now, many loop optimizations and support for single instruction, multiple data (SIMD) programming are still missing in Lisp.

We correct this deficiency with two libraries: The first one is sb-simd, an SBCL-specific library that provides convenient bindings for various SIMD instructions sets. The second one is Loopus, a portable loop optimization framework that works via macros and source to source transformations. The most prominent features of Loopus are its optimization of array accesses and that, on SBCL, it automatically applies SIMD vectorization to certain loops.

We conclude with a performance evaluation for several example programs, and show that Lisp code using our libraries can achieve up to 94% of the performance of highly optimized C code.