Repository logo

Infoscience

  • English
  • French
Log In
Logo EPFL, École polytechnique fédérale de Lausanne

Infoscience

  • English
  • French
Log In
  1. Home
  2. Academic and Research Output
  3. Conferences, Workshops, Symposiums, and Seminars
  4. Miniboxing: Improving the Speed to Code Size Tradeoff in Parametric Polymorphism Translations
 
Loading...
Thumbnail Image
conference paper

Miniboxing: Improving the Speed to Code Size Tradeoff in Parametric Polymorphism Translations

Ureche, Vlad  
•
Talau, Cristian
•
Odersky, Martin  
2013
Proceedings of the ACM SIGPLAN 2013 Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA'13)
ACM SIGPLAN 2013 Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA'13)

Parametric polymorphism enables code reuse and type safety. Underneath the uniform interface exposed to programmers, however, its low level implementation has to cope with inherently non-uniform data: value types of different sizes and semantics (bytes, integers, floating point numbers) and reference types (pointers to heap objects). On the Java Virtual Machine, parametric polymorphism is currently translated to bytecode using two competing approaches: homogeneous and heterogeneous. Homogeneous translation requires boxing, and thus introduces indirect access delays. Heterogeneous translation duplicates and adapts code for each value type individually, producing more bytecode. Therefore bytecode speed and size are at odds with each other. This paper proposes a novel translation that significantly reduces the bytecode size without affecting the execution speed. The key insight is that larger value types (such as integers) can hold smaller ones (such as bytes) thus reducing the duplication necessary in heterogeneous translations. In our implementation, on the Scala compiler, we encode all primitive value types in long integers. The resulting bytecode approaches the performance of monomorphic code, matches the performance of the heterogeneous translation and obtains speedups of up to 22x over the homogeneous translation, all with modest increases in size.

  • Files
  • Details
  • Metrics
Loading...
Thumbnail Image
Name

miniboxing-oopsla13.pdf

Type

Publisher's Version

Access type

openaccess

Size

1.74 MB

Format

Adobe PDF

Checksum (MD5)

e93cc6fb64853ffab5230d81103f0ba4

Loading...
Thumbnail Image
Name

mbox2-trans-big.png

Access type

openaccess

Size

515.98 KB

Format

PNG

Checksum (MD5)

da1e8282bc996ec962fab23d9ac2b1be

Logo EPFL, École polytechnique fédérale de Lausanne
  • Contact
  • infoscience@epfl.ch

  • Follow us on Facebook
  • Follow us on Instagram
  • Follow us on LinkedIn
  • Follow us on X
  • Follow us on Youtube
AccessibilityLegal noticePrivacy policyCookie settingsEnd User AgreementGet helpFeedback

Infoscience is a service managed and provided by the Library and IT Services of EPFL. © EPFL, tous droits réservés