2015 · 13 citations · 28 references
ComputingComputer EngineeringComputer ScienceCompilersProgramming LanguagesSystems ProgrammingAbstract Syntax TreesCompiler ConstructionData TypesObject-oriented ProgrammingType CheckingType SystemsAbstraction MechanismsDynamic DispatchLibrary CollectionsRuntime SpecializationSource Code EvolutionSource Code TransparencyTransformations
To maximize run-time performance, programmers often specialize their code by hand, replacing library collections and containers by custom objects in which data is restructured for efficient access. However, changing the data representation is a tedious and error-prone process that makes it hard to test, maintain and evolve the source code. We present an automated and composable mechanism that allows programmers to safely change the data representation in delimited scopes containing anything from expressions to entire class definitions. To achieve this, programmers define a transformation and our mechanism automatically and transparently applies it during compilation, eliminating the need to manually change the source code. Our technique leverages the type system in order to offer correctness guarantees on the transformation and its interaction with object-oriented language features, such as dynamic dispatch, inheritance and generics. We have embedded this technique in a Scala compiler plugin and used it in four very different transformations, ranging from improving the data layout and encoding, to retrofitting specialization and value class status, and all the way to collection deforestation. On our benchmarks, the technique obtained speedups between 1.8x and 24.5x.
28
How to make ad-hoc polymorphism less ad hoc
Philip Wadler, Stephen Blott · 1989 · 770 citations · Full text
Deforestation: transforming programs to eliminate trees
Philip Wadler · Theoretical Computer Science · 1990 · 707 citations
Statistically rigorous java performance evaluation
Andy Georges, Dries Buytaert, Lieven Eeckhout · 2007 · 525 citations · Full text
Trace-based just-in-time type specialization for dynamic languages
Andreas Gal, Brendan Eich, Mike Shaver et al. · 2009 · 341 citations
Views: a way for pattern matching to cohabit with data abstraction
Philip Wadler · 1987 · 320 citations
Computing, Computer Science, Design +17