[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/2489837.2489846acmotherconferencesArticle/Chapter ViewAbstractPublication PagesecoopConference Proceedingsconference-collections
research-article

An experimental study of the influence of dynamic compiler optimizations on Scala performance

Published: 02 July 2013 Publication History

Abstract

Java Virtual Machines are optimized for performing well on traditional Java benchmarks, which consist almost exclusively of code generated by the Java source compiler (javac). Code generated by compilers for other languages has not received nearly as much attention, which results in performance problems for those languages.
One important specimen of "another language" is Scala, whose syntax and features encourage a programming style that differs significantly from traditional Java code. It suffers from the same problem -- its code patterns are not optimized as well as the ones originating from Java code. JVM developers need to be aware of the differences between Java and Scala code, so that both types of code can be executed with optimal performance.
This paper presents a detailed investigation of the performance impact of a large number of optimizations on the Scala DaCapo and the Java DaCapo benchmark suites. It describes the optimization techniques and analyzes the differences between traditional Java applications and Scala applications. The results help compiler engineers in understanding the characteristics of Scala.
We performed these experiments on the work-in-progress Graal compiler. Graal is a new dynamic compiler for the HotSpot VM which aims to work well for a diverse set of workloads, including languages other than Java.

References

[1]
S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 169--190. ACM Press, Oct. 2006.
[2]
G. Duboscq, L. Stadler, T. Würthinger, D. Simon, and C. Wimmer. Graal IR: An extensible declarative intermediate representation. In Proceedings of the Asia-Pacific Programming Languages and Compilers Workshop, 2013.
[3]
R. Hickey. The Clojure programming language. In Proceedings of the 2008 symposium on Dynamic languages. ACM Press, 2008.
[4]
U. Hölzle, C. Chambers, and D. Ungar. Debugging optimized code with dynamic deoptimization. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 32--43. ACM Press, 1992. ISBN 0-89791-475-9.
[5]
K. Hoste and L. Eeckhout. Cole: compiler optimization level exploration. In Proceedings of the International Symposium on Code Generation and Optimization, pages 165--174. ACM Press, 2008.
[6]
M. R. Jantz and P. A. Kulkarni. Performance potential of optimization phase selection during dynamic JIT compilation. In Proceedings of the ACM/USENIX International Conference on Virtual Execution Environments, pages 131--142. ACM Press, 2013.
[7]
S. Kulkarni, J. Cavazos, C. Wimmer, and D. Simon. Automatic construction of inlining heuristics using machine learning. In Proceedings of the International Symposium on Code Generation and Optimization. IEEE Computer Society, 2013. 6495004.
[8]
T. Lindholm, F. Yellin, G. Bracha, and A. Buckley. The Java#8482; Virtual Machine Specification, Java SE 7 Edition. Addison-Wesley, 2013.
[9]
M. Odersky and al. An overview of the scala programming language. Technical Report IC/2004/64, EPFL Lausanne, Switzerland, 2004.
[10]
OpenJDK Project. Graal Project. URL http://openjdk.java.net/projects/graal/.
[11]
R. Pozo and B. Miller. SciMark 2.0. URL http://www.spec.org/jbb2005/.
[12]
A. Sewe, M. Mezini, A. Sarimbekov, and W. Binder. Da Capo con Scala: design and analysis of a scala benchmark suite for the java virtual machine. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 657--676. ACM Press, 2011.
[13]
A. Sewe, M. Mezini, A. Sarimbekov, D. Ansaloni, W. Binder, N. Ricci, and S. Z. Guyer. new Scala() instance of Java: a comparison of the memory behaviour of Java and Scala programs. In Proceedings of the International Symposium on Memory Management, pages 97--108. ACM Press, 2012.
[14]
L. Stadler, G. Duboscq, H. Mössenböck, and T. Würthinger. Compilation queuing and graph caching for dynamic compilers. In Proceedings of the ACM workshop on Virtual Machines and Intermediate Languages, pages 49--58. ACM Press, 2012.
[15]
Standard Performance Evaluation Corporation. SPECjbb2005,. URL http://www.spec.org/jbb2005/.
[16]
Standard Performance Evaluation Corporation. SPECjvm2008,. URL http://www.spec.org/jvm2008/.

Cited By

View all
  • (2024)GraalSP: Polyglot, efficient, and robust machine learning-based static profilerJournal of Systems and Software10.1016/j.jss.2024.112058213(112058)Online publication date: Jul-2024
  • (2023)TASTyTruffle: Just-in-Time Specialization of Parametric PolymorphismProceedings of the ACM on Programming Languages10.1145/36228537:OOPSLA2(1561-1588)Online publication date: 16-Oct-2023
  • (2023)Diagnosing Compiler Performance by Comparing Optimization DecisionsProceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3617651.3622994(47-61)Online publication date: 19-Oct-2023
  • Show More Cited By

Index Terms

  1. An experimental study of the influence of dynamic compiler optimizations on Scala performance

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    SCALA '13: Proceedings of the 4th Workshop on Scala
    July 2013
    84 pages
    ISBN:9781450320641
    DOI:10.1145/2489837
    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 ACM 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

    • CNRS: Centre National De La Rechercue Scientifique
    • UM2: University Montpellier 2
    • AITO: Assoc Internationale por les Technologies Objects

    In-Cooperation

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 02 July 2013

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Scala
    2. compiler
    3. dynamic compiler
    4. optimization
    5. virtual machine

    Qualifiers

    • Research-article

    Conference

    ECOOP '13
    Sponsor:
    • CNRS
    • UM2
    • AITO

    Acceptance Rates

    SCALA '13 Paper Acceptance Rate 12 of 22 submissions, 55%;
    Overall Acceptance Rate 12 of 22 submissions, 55%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)5
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 17 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)GraalSP: Polyglot, efficient, and robust machine learning-based static profilerJournal of Systems and Software10.1016/j.jss.2024.112058213(112058)Online publication date: Jul-2024
    • (2023)TASTyTruffle: Just-in-Time Specialization of Parametric PolymorphismProceedings of the ACM on Programming Languages10.1145/36228537:OOPSLA2(1561-1588)Online publication date: 16-Oct-2023
    • (2023)Diagnosing Compiler Performance by Comparing Optimization DecisionsProceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3617651.3622994(47-61)Online publication date: 19-Oct-2023
    • (2023)Optimization-Aware Compiler-Level Event ProfilingACM Transactions on Programming Languages and Systems10.1145/3591473Online publication date: 10-Apr-2023
    • (2021)Virtual ADTs for portable metaprogrammingProceedings of the 18th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3475738.3480717(36-44)Online publication date: 29-Sep-2021
    • (2020)SymJEx: symbolic execution on the GraalVMProceedings of the 17th International Conference on Managed Programming Languages and Runtimes10.1145/3426182.3426187(63-72)Online publication date: 4-Nov-2020
    • (2019)An optimization-driven incremental inline substitution algorithm for just-in-time compilersProceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization10.5555/3314872.3314893(164-179)Online publication date: 16-Feb-2019
    • (2019)ScalayzerProceedings of the 4th ACM/IEEE Symposium on Edge Computing10.1145/3318216.3363336(371-376)Online publication date: 7-Nov-2019
    • (2019)An Optimization-Driven Incremental Inline Substitution Algorithm for Just-in-Time Compilers2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO.2019.8661171(164-179)Online publication date: Feb-2019
    • (2019)Detecting Input Sanitization Errors in Scala2019 Seventh International Symposium on Computing and Networking Workshops (CANDARW)10.1109/CANDARW.2019.00062(313-319)Online publication date: Nov-2019
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media