Title
Automating ad hoc data representation transformations
Abstract
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.
Year
DOI
Venue
2015
10.1145/2814270.2814271
Conference on Object-Oriented Programming Systems, Languages, and Applications
Keywords
Field
DocType
bytecode,compatibility,data representation,jvm,optimization,safety,semantics,transformation
Programming language,External Data Representation,Scala,Computer science,Source code,Correctness,Dynamic dispatch,Theoretical computer science,Compiler,Plug-in,Bytecode
Conference
Volume
Issue
ISSN
50
10
0362-1340
Citations 
PageRank 
References 
7
0.49
24
Authors
4
Name
Order
Citations
PageRank
Vlad Ureche11457.78
Aggelos Biboudis2164.78
Yannis Smaragdakis32247147.50
Martin Odersky42261170.39