Automating Ad hoc Data Representation Transformations

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.


Published in:
Acm Sigplan Notices, 50, 10, 801-820
Presented at:
Object Oriented Programming Systems Languages and Applications (OOPSLA)', u"[u'ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Pittsburgh, PA, USA, October 25-30, 2015
Year:
2015
Publisher:
New York, Assoc Computing Machinery
ISSN:
0362-1340
Keywords:
Note:
Published in OOPSLA '15: http://2015.splashcon.org/event/oopsla2015-automating-ad-hoc-data-representation-transformations
Laboratories:


Note: The status of this file is: Involved Laboratories Only


 Record created 2015-04-08, last modified 2018-10-07

Publisher's version:
Download fulltextPDF
n/a:
Download fulltextPNG
External link:
Download fulltextURL
Rate this document:

Rate this document:
1
2
3
 
(Not yet reviewed)