Efficient Monadic Streams
Övrigt konferensbidrag, 2015

Functional stream representations allow for a high-level, compositional way of programming digital signal processing algorithms. However, some algorithms, such as filters, cannot be efficiently implemented using purely functional techniques, due to excessive copying of data. We present a monadic representation of streams which introduces the ability to use mutation for efficiency when implementing algorithms. Still, our representation enjoys many of the benefits of purely functional streams, such as a functional API and fusion. Our representation enables further optimizations: we show how to remove duplicate loop variables, and how to keep buffers entirely in references. Our measurements show that the new monadic representation consistently outperforms the functional representation by at least a factor of four when evaluated in the context of the Feldspar embedded DSL.


Josef Svenningsson

Chalmers, Data- och informationsteknik, Programvaruteknik

Emil Axelsson

Chalmers, Data- och informationsteknik, Programvaruteknik

Anders Persson

Chalmers, Data- och informationsteknik, Programvaruteknik

Peter A. Jonsson

Trends in Functional Programming


Informations- och kommunikationsteknik


Data- och informationsvetenskap

Mer information