Efficient audio signal processing using LLVM and Haskell
"Efficient audio signal processing using LLVM and Haskell"
by Henning Thielemann, on 2013-04-30 00:00
I am using LLVM for audio signal processing via Haskell. My goal is to combine the safety and elegance of Haskell with the speed of code generated by LLVM. My approach is an embedded domain specific language (EDSL), that is, my library provides Haskell functions that look like signal processing functions, but actually they represent pieces of LLVM assembly code. Composing such signal functions means assembling large LLVM code blocks from smaller ones. I use the JIT for turning the LLVM code into executable C functions. This also allows me to adapt to available processor extensions like SSE and AVX at startup time of a signal processing program. I make intensive use of the vector instructions of LLVM.