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
 
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
Type
conference paper
DOI
10.1145/2509136.2509537
Web of Science ID

WOS:000327697300004

Author(s)
Ureche, Vlad  
Talau, Cristian
Odersky, Martin  
Date Issued

2013

Published in
Proceedings of the ACM SIGPLAN 2013 Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA'13)
Subjects

Miniboxing

•

Specialization

•

Data Representation

•

Parametric Polymorphism

•

Erasure

•

Scala

•

Java Virtual Machine

•

Bytecode

•

Generics

URL

URL

https://github.com/miniboxing/miniboxing-plugin
Editorial or Peer reviewed

REVIEWED

Written at

EPFL

EPFL units
LAMP1  
Event nameEvent placeEvent date
ACM SIGPLAN 2013 Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA'13)

Indianapolis, Indiana, USA

October 26-31, 2013

Available on Infoscience
August 11, 2013
Use this identifier to reference this record
https://infoscience.epfl.ch/handle/20.500.14299/94038
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