skip to main content
10.1145/2695664.2695837acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
research-article

Adaptive just-in-time value class optimization: transparent data structure inlining for fast execution

Published: 13 April 2015 Publication History

Abstract

The performance of value classes is highly dependent on how they are represented in the virtual machine. Value class instances are immutable, have no identity, and can only refer to other value classes or primitives and since they should be very lightweight and fast, it is important to optimize them well. In this paper we present a technique to detect and compress commonly occurring patterns of value class usage to improve memory usage and performance. microbenchmarks show two to ten-fold speedup of a small prototypical implementation over the implementation of value classes in other object-oriented language implementations.

References

[1]
J. Aycock. "A Brief History of Just-in-time". In: ACM Computing Surveys 35.2 (June 2003), pp. 97--113.
[2]
D. F. Bacon. "Kava: a Java dialect with a uniform object model for lightweight classes". In: Concurrency and Computation: Practice and Experience 15.3-5 (Feb. 12, 2003), pp. 185--206.
[3]
D. Bacon, S. Fink, and D. Grove. "Space- and Time-Efficient Implementation of the Java Object Model". In: ECOOP 2002 Object-Oriented Programming. Ed. by B. Magnusson. Vol. 2374. Lecture Notes in Computer Science. Springer Berlin / Heidelberg, May 29, 2002, pp. 13--27.
[4]
V. Bala, E. Duesterwald, and S. Banerjia. "Dynamo: A Transparent Dynamic Optimization System". In: ACM SIGPLAN Notices 35.5 (2000), pp. 1--12.
[5]
M. Bebenita, F. Brandner, M. Fahndrich, F. Logozzo, W. Schulte, N. Tillmann, and H. Venter. "SPUR: A Trace-based JIT Compiler for CIL". In: SIGPLAN Notices 45.10 (Oct. 2010), pp. 708--725.
[6]
C. F. Bolz. "Meta-tracing just-in-time compilation for RPython". PhD thesis. Mathematisch-Naturwissenschaftliche Fakultät, Heinrich Heine Universität Düsseldorf, 2012.
[7]
C. F. Bolz, A. Cuni, M. Fijalkowski, M. Leuschel, S. Pedroni, and A. Rigo. "Allocation Removal by Partial Evaluation in a Tracing JIT". In: Proc. PEPM (2011), pp. 43--52.
[8]
C. F. Bolz, A. Cuni, M. Fijalkowski, M. Leuschel, S. Pedroni, and A. Rigo. "Allocation Removal by Partial Evaluation in a Tracing JIT". In: Proceedings of the 20th ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation. PEPM '11. Austin, Texas, USA: ACM, 2011, pp. 43--52.
[9]
C. F. Bolz, A. Cuni, M. Fijalkowski, M. Leuschel, S. Pedroni, and A. Rigo. "Runtime Feedback in a Meta-Tracing JIT for Efficient Dynamic Languages". In: Proc. ICOOOLPS. 2011, 9:1--9:8.
[10]
C. F. Bolz, A. Cuni, M. Fijalkowski, and A. Rigo. "Tracing the Meta-level: PyPy's Tracing JIT Compiler". In: Proceedings of the 4th Workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems. ICOOOLPS '09. Genova, Italy: ACM, 2009, pp. 18--25.
[11]
C. F. Bolz, A. Kuhn, A. Lienhard, N. D. Matsakis, O. Nierstrasz, L. Renggli, A. Rigo, and T. Verwaest. "Back to the Future in OneWeek Implementing a Smalltalk VM in PyPy". In: Self-Sustaining Systems. Vol. 5146. Lecture Notes in Computer Science. Springer Berlin Heidelberg, 2008, pp. 123--139.
[12]
C. F. Bolz, T. Pape, J. Siek, and S. Tobin-Hochstadt. "Meta-tracing makes a fast Racket". In: Dyla'14. Edinburgh, United Kingdom, June 2014.
[13]
C. F. Bolz and L. Tratt. "The impact of meta-tracing on VM design and implementation". In: Science of Computer Programming (2013).
[14]
C. Chambers, D. Ungar, and E. Lee. "An efficient implementation of Self, a dynamically-typed object-oriented language based on prototypes". In: SIGPLAN Notices 24.10 (Sept. 1989), pp. 49--70.
[15]
L. P. Deutsch and A. M. Schiffman. "Efficient Implementation of the Smalltalk-80 System". In: Proceedings of the 11th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages. POPL '84. Salt Lake City, Utah, USA: ACM, 1984, pp. 297--302.
[16]
A. P. Ershov. "On Programming of Arithmetic Operations". In: Communications of the ACM 1.8 (Aug. 1958), pp. 3--6.
[17]
M. Felleisen and D. P. Friedman. "Control operators, the SECD-machine and the -calculus". In: Proceedings of the 2nd Working Conference on Formal Description of Programming Concepts - III. Ed. by M. Wirsing. Elsevier, 1987, pp. 193--217.
[18]
J.-C. Filliâtre and S. Conchon. "Type-safe Modular Hashconsing". In: Proceedings of the 2006 Workshop on ML. ML '06. Portland, Oregon, USA: ACM, 2006, pp. 12--19.
[19]
A. Gal, C. W. Probst, and M. Franz. "HotpathVM: An Effective JIT Compiler for Resource-Constrained Devices". In: Proceedings of the 2nd International Conference on Virtual Execution Environments. VEE '06. Ottawa, Ontario, Canada: ACM, June 14, 2006, pp. 144--153.
[20]
A. Gal et al. "Trace-based Just-in-time Type Specialization for Dynamic Languages". In: SIGPLAN Notices 44.6 (June 2009), pp. 465--478.
[21]
A. Gill, J. Launchbury, and S. L. Peyton Jones. "A Short Cut to Deforestation". In: Proceedings of the Conference on Functional Programming Languages and Computer Architecture. FPCA '93. Copenhagen, Denmark: ACM, 1993, pp. 223--232.
[22]
Google, Inc. Chrome V8 Documentation: Design Elements. Sept. 17, 2012. url: https://developers.google.com/v8/design (visited on 09/11/2014).
[23]
E. Goto. Monocopy and Associative Algorithms in Extended Lisp. Technical Report TR-74-03. University of Tokyo, Japan, 1974.
[24]
M. Hölttä. Crankshafting from the ground up. Tech. rep. Google, Aug. 2013.
[25]
Microsoft Developer Network. Common Type System. Aug. 22, 2014. url: http://msdn.microsoft.com/en-us/library/zcx1eb1e(d=default,l=en-us,v=vs.110).aspx (visited on 09/15/2014).
[26]
J. G. Mitchell. "The Design and Construction of Flexible and Efficient Interactive Programming Systems". PhD thesis. Pittsburgh, PA, USA: Carnegie Mellon University, 1970.
[27]
M. E. Noth. "Exploding Java Objects for Performance". PhD thesis. University of Washington, 2003.
[28]
M. Odersky, P. Altherr, V. Cremet, B. Emir, S. Maneth, S. Micheloud, N. Mihaylov, M. Schinz, E. Stenman, and M. Zenger. An overview of the Scala programming language. Tech. rep. LAP-REPORT-2006-0001. Lausanne, Switzerland: EFPL, 2006.
[29]
M. Paleczny, C. A. Vick, and C. Click. "The Java HotSpot Server Compiler". In: Proceedings of the 2001 Symposium on Java Virtual Machine Research and Technology Symposium - Volume 1. JVM'01. Monterey, California: USENIX Association, Apr. 24, 2001.
[30]
A. Rigo and S. Pedroni. "PyPy's approach to virtual machine construction". In: Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications. OOPSLA '06. Portland, Oregon, USA: ACM, 2006, pp. 944--953.
[31]
J. Rose. JEP 169: Value Objects. July 10, 2014. url: http://openjdk.java.net/jeps/169 (visited on 09/15/2014).
[32]
Z. Shao, J. H. Reppy, and A. W. Appel. "Unrolling lists". In: SIGPLAN Lisp Pointers VII.3 (July 1994), pp. 185--195.
[33]
G. T. Sullivan, D. L. Bruening, I. Baron, T. Garnett, and S. Amarasinghe. "Dynamic Native Optimization of Interpreters". In: Proceedings of the 2003 Workshop on Interpreters, Virtual Machines and Emulators. IVME '03. San Diego, California: ACM, June 8, 2003, pp. 50--57.
[34]
A. Takano and E. Meijer. "Shortcut Deforestation in Calculational Form". In: Proceedings of the Seventh International Conference on Functional Programming Languages and Computer Architecture. FPCA '95. La Jolla, California, USA: ACM, 1995, pp. 306--313.
[35]
E. W. Thomassen. "Trace-based just-in-time compiler for Haskell with RPython". MA thesis. Norwegian University of Science and Technology Trondheim, 2013.
[36]
P. Wadler. "Deforestation: transforming programs to eliminate trees". In: Theoretical Computer Science 73.2 (1990), pp. 231--248.
[37]
C. Wimmer. "Automatic object inlining in a Java virtual machine". PhD thesis. Linz, Austria: Johannes Kepler Universität, 2008.

Cited By

View all
  • (2021)Compiler-assisted object inlining with value fieldsProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454034(128-141)Online publication date: 19-Jun-2021
  • (2017)Record data structures in racketACM SIGAPP Applied Computing Review10.1145/3040575.304057816:4(25-37)Online publication date: 13-Jan-2017
  • (2016)Optimizing record data structures in RacketProceedings of the 31st Annual ACM Symposium on Applied Computing10.1145/2851613.2851732(1798-1805)Online publication date: 4-Apr-2016

Index Terms

  1. Adaptive just-in-time value class optimization: transparent data structure inlining for fast execution

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      SAC '15: Proceedings of the 30th Annual ACM Symposium on Applied Computing
      April 2015
      2418 pages
      ISBN:9781450331968
      DOI:10.1145/2695664
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Sponsors

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 13 April 2015

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. JIT
      2. data structure optimization
      3. meta-tracing
      4. value classes

      Qualifiers

      • Research-article

      Funding Sources

      • EPSRC

      Conference

      SAC 2015
      Sponsor:
      SAC 2015: Symposium on Applied Computing
      April 13 - 17, 2015
      Salamanca, Spain

      Acceptance Rates

      SAC '15 Paper Acceptance Rate 291 of 1,211 submissions, 24%;
      Overall Acceptance Rate 1,650 of 6,669 submissions, 25%

      Upcoming Conference

      SAC '25
      The 40th ACM/SIGAPP Symposium on Applied Computing
      March 31 - April 4, 2025
      Catania , Italy

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)0
      • Downloads (Last 6 weeks)0
      Reflects downloads up to 08 Mar 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2021)Compiler-assisted object inlining with value fieldsProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454034(128-141)Online publication date: 19-Jun-2021
      • (2017)Record data structures in racketACM SIGAPP Applied Computing Review10.1145/3040575.304057816:4(25-37)Online publication date: 13-Jan-2017
      • (2016)Optimizing record data structures in RacketProceedings of the 31st Annual ACM Symposium on Applied Computing10.1145/2851613.2851732(1798-1805)Online publication date: 4-Apr-2016

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media