Info: Zenodo’s user support line is staffed on regular business days between Dec 23 and Jan 5. Response times may be slightly longer than normal.

Published March 21, 2022 | Version v1
Conference paper Open

Closing the Performance Gap Between Lisp and C

  • 1. FAU Erlangen-Nürnberg

Description

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.

 

Files

2022-ELS-SIMD.pdf

Files (446.2 kB)

Name Size Download all
md5:2594b22f648684b2b05a3d989a1a2693
446.2 kB Preview Download

Additional details

Related works

Compiles
2677-3465 (ISSN)