Reflection without remorse: Revealing a hidden sequence to speed up monadic reflection

Atze Van Der Ploeg, Oleg Kiselyov

研究成果: Conference contribution

11 被引用数 (Scopus)

抄録

A series of list appends or monadic binds for many monads performs algorithmically worse when left-associated. Continuation-passing style (CPS) is well-known to cure this severe dependence of performance on the association pattern. The advantage of CPS dwindles or disappears if we have to examine or modify the intermediate result of a series of appends or binds, before continuing the series. Such examination is frequently needed, for example, to control search in non-determinism monads. We present an alternative approach that is just as general as CPS but more robust: it makes series of binds and other such operations efficient regardless of the association pattern - and also provides efficient access to intermediate results. The key is to represent such a conceptual sequence as an efficient sequence data structure. Efficient sequence data structures from the literature are homogeneous and cannot be applied as they are in a type-safe way to series of monadic binds. We generalize them to type aligned sequences and show how to construct their (assuredly order-preserving) implementations. We demonstrate that our solution solves previously undocumented, severe performance problems in iteratees, LogicT transformers, free monads and extensible effects.

本文言語English
ホスト出版物のタイトルHaskell 2014 - Proceedings of the 2014 ACM SIGPLAN Haskell Symposium
出版社Association for Computing Machinery
ページ133-144
ページ数12
ISBN(印刷版)9781450330411
DOI
出版ステータスPublished - 2014 1 1
外部発表はい
イベント2014 6th ACM SIGPLAN Haskell Symposium, Haskell 2014 - Gothenburg, Sweden
継続期間: 2014 9 42014 9 5

出版物シリーズ

名前Haskell 2014 - Proceedings of the 2014 ACM SIGPLAN Haskell Symposium

Other

Other2014 6th ACM SIGPLAN Haskell Symposium, Haskell 2014
CountrySweden
CityGothenburg
Period14/9/414/9/5

ASJC Scopus subject areas

  • Computer Graphics and Computer-Aided Design
  • Software

フィンガープリント 「Reflection without remorse: Revealing a hidden sequence to speed up monadic reflection」の研究トピックを掘り下げます。これらがまとまってユニークなフィンガープリントを構成します。

引用スタイル