While Java is a statically-typed language, some of its features make it behave like a dynamically-typed language at run time. This includes Java’s boxing of primitive values as well as generics, which rely on type erasure.
This paper investigates how runtime technology for dynamically-typed languages such as JavaScript and Python can be used for Java bytecode. Using optimistic optimizations, we specialize bytecode instructions that access references in such a way, that they can handle primitive data directly and also specialize data structures in order to avoid boxing for primitive types. Our evaluation shows that these optimizations can be successfully applied to a statically-typed language such as Java and can also improve performance significantly. With this approach, we get an efficient implementation of Java's generics, avoid changes to the Java language, and maintain backwards compatibility, allowing existing code to benefit from our optimization transparently.
%0 Conference Paper
%1 Grimmer:2017:TJ
%A Grimmer, Matthias
%A Marr, Stefan
%A Kahlhofer, Mario
%A Wimmer, Christian
%A Würthinger, Thomas
%A Mössenböck, Hanspeter
%B Proceedings of the 14th International Conference on Managed Languages and Runtimes
%D 2017
%I ACM
%K MeMyPublication myown
%R 10.1145/3132190.3132202
%T Applying Optimizations for Dynamically-typed Languages to Java
%X While Java is a statically-typed language, some of its features make it behave like a dynamically-typed language at run time. This includes Java’s boxing of primitive values as well as generics, which rely on type erasure.
This paper investigates how runtime technology for dynamically-typed languages such as JavaScript and Python can be used for Java bytecode. Using optimistic optimizations, we specialize bytecode instructions that access references in such a way, that they can handle primitive data directly and also specialize data structures in order to avoid boxing for primitive types. Our evaluation shows that these optimizations can be successfully applied to a statically-typed language such as Java and can also improve performance significantly. With this approach, we get an efficient implementation of Java's generics, avoid changes to the Java language, and maintain backwards compatibility, allowing existing code to benefit from our optimization transparently.
%@ 978-1-4503-5340-3/17/09
@inproceedings{Grimmer:2017:TJ,
abstract = {While Java is a statically-typed language, some of its features make it behave like a dynamically-typed language at run time. This includes Java’s boxing of primitive values as well as generics, which rely on type erasure.
This paper investigates how runtime technology for dynamically-typed languages such as JavaScript and Python can be used for Java bytecode. Using optimistic optimizations, we specialize bytecode instructions that access references in such a way, that they can handle primitive data directly and also specialize data structures in order to avoid boxing for primitive types. Our evaluation shows that these optimizations can be successfully applied to a statically-typed language such as Java and can also improve performance significantly. With this approach, we get an efficient implementation of Java's generics, avoid changes to the Java language, and maintain backwards compatibility, allowing existing code to benefit from our optimization transparently.},
acceptancerate = {0.45},
added-at = {2017-08-15T19:02:06.000+0200},
author = {Grimmer, Matthias and Marr, Stefan and Kahlhofer, Mario and Wimmer, Christian and Würthinger, Thomas and Mössenböck, Hanspeter},
biburl = {https://www.bibsonomy.org/bibtex/21425bd31ad71e92df378b7b7d340f1e8/gron},
booktitle = {Proceedings of the 14th International Conference on Managed Languages and Runtimes},
doi = {10.1145/3132190.3132202},
interhash = {20a606d561a9bf2a0fab64448c175c23},
intrahash = {1425bd31ad71e92df378b7b7d340f1e8},
isbn = {978-1-4503-5340-3/17/09},
keywords = {MeMyPublication myown},
location = {Prague, Czech Republic},
month = {September},
numpages = {11},
pdf = {https://stefan-marr.de/downloads/manlang17-grimmer-et-al-applying-optimizations-for-dynamically-typed-languages-to-java.pdf},
publisher = {ACM},
series = {ManLang'17},
timestamp = {2022-08-29T20:30:40.000+0200},
title = {{Applying Optimizations for Dynamically-typed Languages to Java}},
year = 2017
}