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 2013Publication 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. doi: 10.1145/1167473.1167488. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  3. R. Hickey. The Clojure programming language. In Proceedings of the 2008 symposium on Dynamic languages. ACM Press, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. doi: 10.1145/143095.143114. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. doi: 10.1145/1356058.1356080. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. doi: 10.1145/2451512.2451539. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. doi: 10.1109/CGO.2013. 6495004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. T. Lindholm, F. Yellin, G. Bracha, and A. Buckley. The Java#8482; Virtual Machine Specification, Java SE 7 Edition. Addison-Wesley, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Odersky and al. An overview of the scala programming language. Technical Report IC/2004/64, EPFL Lausanne, Switzerland, 2004.Google ScholarGoogle Scholar
  10. OpenJDK Project. Graal Project. URL http://openjdk.java.net/projects/graal/.Google ScholarGoogle Scholar
  11. R. Pozo and B. Miller. SciMark 2.0. URL http://www.spec.org/jbb2005/.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. doi: 10.1145/2258996.2259010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. doi: 10.1145/2414740.2414750. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Standard Performance Evaluation Corporation. SPECjbb2005,. URL http://www.spec.org/jbb2005/.Google ScholarGoogle Scholar
  16. Standard Performance Evaluation Corporation. SPECjvm2008,. URL http://www.spec.org/jvm2008/.Google ScholarGoogle Scholar

Index Terms

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

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

      Copyright © 2013 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 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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 2 July 2013

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      SCALA '13 Paper Acceptance Rate12of22submissions,55%Overall Acceptance Rate12of22submissions,55%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader