Dynamic class loading in the Java virtual machine
Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Making the future safe for the past: adding genericity to the Java programming language
Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Design and implementation of generics for the .NET Common language runtime
Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation
The java hotspotTM server compiler
JVM'01 Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium - Volume 1
Design of the Java HotSpot™ client compiler for Java 6
ACM Transactions on Architecture and Code Optimization (TACO)
Trace-based just-in-time type specialization for dynamic languages
Proceedings of the 2009 ACM SIGPLAN conference on Programming language design and implementation
Compiling generics through user-directed type specialization
Proceedings of the 4th workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems
Scala macros: let our powers combine!: on how rich syntax and static types work with metaprogramming
Proceedings of the 4th Workshop on Scala
Miniboxing: improving the speed to code size tradeoff in parametric polymorphism translations
Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
Hi-index | 0.00 |
Parametric polymorphism in Scala suffers from the usual drawback of erasure on the Java Virtual Machine: primitive values are boxed, leading to indirect access, wasteful use of heap memory and lack of cache locality. For performance-critical parts of the code, the Scala compiler introduces specialization, a transformation that duplicates and adapts the bodies of classes and methods for primitive types. Specializing code can speed up execution by an order of magnitude, but only if the code is called from monomorphic sites or from other specialized code. Still, if these "islands" of specialized code are called from generic code, their performance becomes similar to that of generic code, losing optimality. To address this, our project builds high performance "bridges" between "islands" of specialized code, removing the requirement that full traces need to be specialized: We use macros to delimit performance-critical "gaps" between specialized code, which we also specialize. We then use reified types to dispatch the correct specialized variant, thus recovering performance across the "islands". Our transformation obtains speedups up to 30x and around 12x in average compared to generic only code, by enabling specialization to completely remove boxing and reach its full potential.