skip to main content
10.1145/3397537.3397564acmotherconferencesArticle/Chapter ViewAbstractPublication PagesprogrammingConference Proceedingsconference-collections
short-paper

Toward presizing and pretransitioning strategies for GraalPython

Published:04 August 2020Publication History

ABSTRACT

Presizing and pretransitioning are run-time optimizations that reduce reallocations of lists. These two optimizations have previously been implemented (together with pretenuring) using Mementos in the V8 Javascript engine. The design of Mementos, however, relies on the support of the garbage collector (GC) of the V8 runtime system.

In contrast to V8, dynamic language runtimes written for the GraalVM do not have access to the GC. Thus, the prior work cannot be applied directly. Instead, an alternative implementation approach without reliance on the GC is needed and poses different challenges.

In this paper we explore and analyze an approach for implementing these two optimizations in the context of GraalVM, using the Python implementation for GraalVM as an example. We substantiate these thoughts with rough performance numbers taken from our prototype on which we tested different presizing strategies.

References

  1. Carl Friedrich Bolz, Antonio Cuni, Maciej Fijalkowski, Michael Leuschel, Samuele Pedroni, and Armin Rigo. 2011. Allocation Removal by Partial Evaluation in a Tracing JIT. In Proceedings of the 20th ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation. ACM, 43–52.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Carl Friedrich Bolz, Lukas Diekmann, and Laurence Tratt. 2013. Storage Strategies for Collections in Dynamically Typed Languages. In ACM SIGPLAN Notices, Vol. 48. ACM, 167–182.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Daniel Clifford, Hannes Payer, Michael Stanton, and Ben L Titzer. 2015. Memento Mori: Dynamic Allocation-site-based Optimizations. In ACM SIGPLAN Notices, Vol. 50. ACM, 105–117.Google ScholarGoogle Scholar
  4. Bjorn N Freeman-Benson and John Maloney. 1989. The DeltaBlue Algorithm: An Incremental Constraint Hierarchy Solver. In Eighth Annual International Phoenix Conference on Computers and Communications. 1989 Conference Proceedings. IEEE, 538–542.Google ScholarGoogle Scholar
  5. Andreas Gal, Brendan Eich, Mike Shaver, David Anderson, David Mandelin, Mohammad R Haghighat, Blake Kaplan, Graydon Hoare, Boris Zbarsky, Jason Orendorff, et al. 2009. Trace-based Just-in-time Type Specialization for Dynamic Languages. In ACM Sigplan Notices, Vol. 44. ACM, 465–478.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Matthias Grimmer, Stefan Marr, Mario Kahlhofer, Christian Wimmer, Thomas Würthinger, and Hanspeter Mössenböck. 2017. Applying Optimizations for Dynamically-typed Languages to Java. In Proceedings of the 14th International Conference on Managed Languages and Runtimes. ACM, 12–22.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Stefan Marr, Benoit Daloze, and Hanspeter Mössenböck. 2016. Cross-language Compiler Benchmarking: Are We Fast Yet?. In ACM SIGPLAN Notices, Vol. 52. ACM, 120–131.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Fabio Niephaus, Tim Felgentreff, and Robert Hirschfeld. 2019. GraalSqueak: Toward a Smalltalk-Based Tooling Platform for Polyglot Programming. In Proceedings of the 16th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes (MPLR 2019). Association for Computing Machinery, New York, NY, USA, 14–26.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Tobias Pape, Tim Felgentreff, Robert Hirschfeld, Anton Gulenko, and Carl Friedrich Bolz. 2015. Language-independent Storage Strategies for Tracing-JIT-based Virtual Machines. In ACM SIGPLAN Notices, Vol. 51. ACM, 104–113.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Thomas Würthinger, Christian Wimmer, Andreas Wöß, Lukas Stadler, Gilles Duboscq, Christian Humer, Gregor Richards, Doug Simon, and Mario Wolczko. 2013. One VM to Rule Them All. In Proceedings of the 2013 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming & Software. ACM, 187–204.Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Toward presizing and pretransitioning strategies for GraalPython

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Other conferences
          Programming '20: Companion Proceedings of the 4th International Conference on Art, Science, and Engineering of Programming
          March 2020
          228 pages
          ISBN:9781450375078
          DOI:10.1145/3397537

          Copyright © 2020 ACM

          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].

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 4 August 2020

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • short-paper

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader