Proceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation 2014
DOI: 10.1145/2543728.2543730
|View full text |Cite
|
Sign up to set email alerts
|

Optimizing SYB is easy!

Abstract: The most widely used generic-programming system in the Haskell community, Scrap Your Boilerplate (SYB), also happens to be one of the slowest. Generic traversals in SYB are often an order of magnitude slower than equivalent handwritten, non-generic traversals. Thus while SYB allows the concise expression of many traversals, its use incurs a significant runtime cost. Existing techniques for optimizing other generic-programming systems are not able to eliminate this overhead.This paper presents an optimization t… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1

Citation Types

0
4
0

Year Published

2015
2015
2020
2020

Publication Types

Select...
3
2
1

Relationship

2
4

Authors

Journals

citations
Cited by 7 publications
(4 citation statements)
references
References 19 publications
(15 reference statements)
0
4
0
Order By: Relevance
“…In the past [1,13] HERMIT has been used to successfully prototype GHC optimisations by encoding them as sequences of transformation steps. Now HERMIT can also be used to reason about any preconditions those transformation steps have, as well as to provide mechanical assurances about equational reasoning that is intended to prove properties of Haskell programs, including typeclass laws for instance declarations, and user optimisations stated as GHC rewrite rules.…”
Section: Discussionmentioning
confidence: 99%
See 1 more Smart Citation
“…In the past [1,13] HERMIT has been used to successfully prototype GHC optimisations by encoding them as sequences of transformation steps. Now HERMIT can also be used to reason about any preconditions those transformation steps have, as well as to provide mechanical assurances about equational reasoning that is intended to prove properties of Haskell programs, including typeclass laws for instance declarations, and user optimisations stated as GHC rewrite rules.…”
Section: Discussionmentioning
confidence: 99%
“…The initial HERMIT implementation [12] only supported equational reasoning that was transformational in nature; that is, HER-MIT allowed the user to apply a sequence of correctness-preserving transformations to the Haskell program, resulting in an equivalent but (hopefully) more efficient program. This was sufficient to allow some specific instances of known program transformations to be mechanised [33], as well as for encoding prototypes of new optimisation techniques [1,13]. However, some of the transformation steps used were only valid in certain contexts, and HERMIT had no facility for checking the necessary preconditions.…”
Section: Introductionmentioning
confidence: 99%
“…From there, the features of MetaOCaml [Kiselyov 2014] are used for staging. Adams et al [2014] use the HERMIT plugin [Farmer 2015] as a different approach to optimising SYB. This works by interacting with GHC during the compilation process using a combination of supercompilation [Turchin 1979] and partial evaluation [Jones et al 1993].…”
Section: Related Workmentioning
confidence: 99%
“…[Magalhães 2012] also considered the behaviour of the optimiser on similar generic programs. Adams et al [2014] analysed the poor performance of SYB and performed code optimizations expressed in HERMIT [Farmer 2015] to get better performance, in their extended work they show how this can be done with an adapted version of GHC [Adams et al 2015]. A large problem with their approach is that they rely on being able to symbolically evaluate type casts.…”
Section: Related Workmentioning
confidence: 99%