Faster Coroutine Pipelines: A Reconstruction


Ruben P. Pieters and Tom Schrijvers.
21st International Symposium on Practical Aspects of Declarative Languages (PADL 2019).
2019.

Abstract

Spivey has recently presented a novel functional representation that supports the efficient composition, or merging, of coroutine pipelines for processing streams of data. This representation was inspired by Shivers and Might's three-continuation approach and is shown to be equivalent to a simple yet inefficient executable specification. Unfortunately, neither Shivers and Might's original work nor the equivalence proof sheds much light on the underlying principles allowing the derivation of this efficient representation from its specification. This paper gives the missing insight by reconstructing a systematic derivation in terms of known transformation steps from the simple specification to the efficient representation. This derivation sheds light on the limitations of the representation and on its applicability to other settings. In particular, it has enabled us to obtain a similar representation for pipes featuring two-way communication, similar to the Haskell pipes library. Our benchmarks confirm that this two-way representation retains the same improved performance characteristics.

BibTeX

@inproceedings{padl2019,
  author = {Ruben P. Pieters and Tom Schrijvers},
  title = {Faster Coroutine Pipelines: A Reconstruction},
  year = {2019},
  booktitle = {21st International Symposium on Practical Aspects of Declarative Languages (PADL 2019)},
  url = {/Research/papers/padl2019.pdf},
  abstract = {Spivey has recently presented a novel functional representation that supports
the efficient composition, or merging, of coroutine pipelines for processing
streams of data.  This representation was inspired by Shivers and Might's
three-continuation approach and is shown to be equivalent to a simple yet
inefficient executable specification.
Unfortunately, neither Shivers and Might's original work nor the equivalence
proof sheds much light on the underlying principles allowing the derivation of
this efficient representation from its specification.

This paper gives the missing insight by reconstructing a systematic derivation in
terms of known transformation steps from the simple specification to the
efficient representation. This derivation sheds light on the limitations of the 
representation and on its applicability to other settings. In particular, it has
enabled us to obtain a similar representation for pipes featuring two-way
communication, similar to the Haskell pipes library.
Our benchmarks confirm that this two-way representation retains the same improved
performance characteristics.
  },
}