Compiling Structural Types on the JVM

Date Added: Jun 2009
Format: PDF

This paper describes Scala's compilation technique of structural types for the JVM. The technique uses Java reflection and polymorphic inline caches. Performance measurements of this technique are presented and analyzed. Further measurements compare Scala's reflective technique with the "Generative" technique used by Whiteoak to compile structural types. The paper ends with a comparison of reflective and generative techniques for compiling structural types. It concludes that generative techniques may, in specific cases, exhibit higher performances than reflective approaches, but that reflective techniques are easier to implement and have fewer restrictions.