Data Flow Fusion with Series Expressions in Haskell

We are currently exploring flow fusion, a new fusion method for purely functional array code that overcomes the main limitation of stream fusion, namely stream fusion’s inability to fuse branching streams. Our current flow-fusion prototype in the Glasgow Haskell Compiler manages to achieve a twofold speedup over stream fusion for computing convex hulls of 2D points using the QuickHull algorithm. In fact, the code generated by flow fusion is only a few percent points away from hand-written C code. We have summarised all the details in a draft paper Data Flow Fusion with Series Expressions in Haskell.