CPL - Chalmers Publication Library
| Utbildning | Forskning | Styrkeområden | Om Chalmers | In English In English Ej inloggad.

Efficient Monadic Streams

Josef Svenningsson (Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers)) ; Emil Axelsson (Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers)) ; Anders Persson (Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers)) ; Peter A. Jonsson
Trends in Functional Programming (2015)
[Konferensbidrag, övrigt]

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.



Den här publikationen ingår i följande styrkeområden:

Läs mer om Chalmers styrkeområden  

Denna post skapades 2015-11-17.
CPL Pubid: 225846