Title
Profiling for laziness
Abstract
While many programmers appreciate the benefits of lazy programming at an abstract level, determining which parts of a concrete program to evaluate lazily poses a significant challenge for most of them. Over the past thirty years, experts have published numerous papers on the problem, but developing this level of expertise requires a significant amount of experience. We present a profiling-based technique that captures and automates this expertise for the insertion of laziness annotations into strict programs. To make this idea precise, we show how to equip a formal semantics with a metric that measures waste in an evaluation. Then we explain how to implement this metric as a dynamic profiling tool that suggests where to insert laziness into a program. Finally, we present evidence that our profiler's suggestions either match or improve on an expert's use of laziness in a range of real-world applications.
Year
DOI
Venue
2014
10.1145/2535838.2535887
POPL
Keywords
Field
DocType
present evidence,concrete program,lazy programming,significant amount,dynamic profiling tool,formal semantics,strict program,laziness annotation,abstract level,significant challenge,profiling,code refactoring
Programming language,Computer science,Profiling (computer programming),Laziness,Code refactoring,Semantics of logic
Conference
Volume
Issue
ISSN
49
1
0362-1340
Citations 
PageRank 
References 
1
0.36
13
Authors
2
Name
Order
Citations
PageRank
Stephen Chang1244.07
Matthias Felleisen23001272.57