Exceptionization: A Java']Java VM Optimization for Non-Java']Java Languages

被引:0
|
作者
Yang, Byung-Sun [1 ]
Kim, Jae-Yun [1 ]
Moon, Soo-Mook [1 ]
机构
[1] Seoul Natl Univ, Dept Elect Engn & Comp Sci, Seoul 08826, South Korea
关键词
!text type='Java']Java[!/text]script; !text type='Java']Java[!/text] virtual machine; just-in-time compiler; non [!text type='Java']Java[!/text] languages;
D O I
10.1145/3046681
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Java virtual machine (JVM) has recently evolved into a general-purpose language runtime environment to execute popular programming languages such as JavaScript, Ruby, Python, and Scala. These languages have complex non-Java features, including dynamic typing and first-class function, so additional language runtimes (engines) arc provided on top of the JVM to support them with by extensions. Although there are high-performance JVMs with powerful just-in-time (-HT) compilers, running these languages efficiently on the JVM is still a challenge. This article introduces a simple and novel technique for the JVM JIT compiler called exeeptionization to improve the performance of JVM-based language runtimes. We observed that the JVM executing some non-Java languages encounters at least 2 times more branch bytecodes than Java, most of which are highly biased to take only one target. Exceptionization treats such a highly biased branch as some implicit exception throwing instruction. This allows the JVM JIT compiler to prune the infrequent target of the branch from the frequent control flow, thus compiling the frequent control flow more aggressively with better optimization. If a pruned path were taken, then it would run like a Java exception handler, that is, a catch block. We also devised de-exceptionization, a mechanism to cope with the case when a pruned path is executed more often than expected. Since exceptionization is a generic JVM optimization, independent of any specific language runtime, it would be generally applicable to other language runtimes on the JVM. Our experimental result shows that exceptionization accelerates the performance of several non-Java languages. For example, JavaScript-onJVM runs faster by as much as 60% and by 6% on average, when experimented with the Octane benchmark suite on Oracle's latest Nashorn JavaScript engine and HotSpot 1.9.NMI. Furthermore, the performance of Ruby-on-JVM shows an improvement by as much as 60% and by 6% on average, while Python-on-JVM improves by as much as 6% and by 2% on average. We found that exceptionization is more effective to apply to the branch bytecode of the language runtime itself than the bytecode corresponding to the application code or the bytecode of the Java class libraries. This implies that the performance benefit of exceptionization comes from better J1'I' compilation of the language runtime of non-Java languages.
引用
收藏
页数:25
相关论文
共 50 条
  • [1] A Study of Java']Java's Non-Java']Java Memory
    Ogata, Kazunori
    Mikurube, Dai
    Kawachiya, Kiyokuni
    Trent, Scott
    Onodera, Tamiya
    [J]. ACM SIGPLAN NOTICES, 2010, 45 (10) : 191 - 204
  • [2] Design of an Introductory Java']Java Parallel Programming Course for Non-Java']Java Students
    Chen, Xuguang
    [J]. 2023 INTERNATIONAL CONFERENCE ON COMPUTATIONAL SCIENCE AND COMPUTATIONAL INTELLIGENCE, CSCI 2023, 2023, : 1746 - 1749
  • [3] Connecting non-Java']Java devices to a Jini network
    McDowell, CE
    Shankari, K
    [J]. TECHNOLOGY OF OBJECT-ORIENTED LANGUAGES - TOOLS 33, PROCEEDINGS, 2000, : 45 - 56
  • [4] What is the Java']Java VM Profiler Interface?
    Wilson, A
    [J]. DR DOBBS JOURNAL, 1999, 24 (09): : 103 - 106
  • [5] Evaluating the Java']Java virtual machine as a target for languages other than Java']Java
    Gough, KJ
    Corney, D
    [J]. MODULAR PROGRAMMING LANGUAGES, PROCEEDINGS, 2001, 1897 : 278 - 290
  • [6] Java']Java, Java']Java, Java']Java and more
    Makulowich, JS
    [J]. DATABASE, 1997, 20 (01): : 74 - 75
  • [7] Embedded Java']Java VM moves even closer
    不详
    [J]. CONTROL AND INSTRUMENTATION, 1998, 30 (01): : 20 - 20
  • [8] COMPARISON OF JAVA']JAVA AND SMALLTALK PROGRAMMING LANGUAGES
    Bublik, Tomas
    [J]. SOFTWARE DEVELOPMENT 2012, 2012, : 18 - 28
  • [9] Java']Java makes scripting languages irrelevant?
    Spinellis, D
    [J]. IEEE SOFTWARE, 2005, 22 (03) : 70 - 71
  • [10] Teaching Programming Languages: Java']Java as a metalanguage
    Ortiz, A
    [J]. PDPTA'2001: PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED PROCESSING TECHNIQUES AND APPLICATIONS, 2001, : 1798 - 1802