Affiliation:
1. IBM Research - Tokyo, Yamato, Japan
2. IBM Thomas J. Watson Research Center, Yorktown heights, NY, USA
Abstract
Applications written in dynamically typed scripting languages are increasingly popular for Web software development. Even on the server side, programmers are using dynamically typed scripting languages such as Ruby and Python to build complex applications quickly. As the number and complexity of dynamically typed scripting language applications grows, optimizing their performance is becoming important. Some of the best performing compilers and optimizers for dynamically typed scripting languages are developed entirely from scratch and target a specific language. This approach is not scalable, given the variety of dynamically typed scripting languages, and the effort involved in developing and maintaining separate infrastructures for each. In this paper, we evaluate the feasibility of adapting and extending an existing production-quality method-based Just-In-Time (JIT) compiler for a language with dynamic types. Our goal is to identify the challenges and shortcomings with the current infrastructure, and to propose and evaluate runtime techniques and optimizations that can be incorporated into a common optimization infrastructure for static and dynamic languages. We discuss three extensions to the compiler to support dynamically typed languages: (1) simplification of control flow graphs, (2) mapping of memory locations to stack-allocated variables, and (3) reduction of runtime overhead using language semantics. We also propose four new optimizations for Python in (2) and (3). These extensions are effective in reduction of compiler working memory and improvement of runtime performance. We present a detailed performance evaluation of our approach for Python, finding an overall improvement of 1.69x on average (up to 2.74x) over our JIT compiler without any optimization for dynamically typed languages and Python.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
7 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. An object model for dynamic mixins;Computer Languages, Systems & Structures;2018-01
2. An object model for a dynamic mixin based language;Proceedings of the 31st Annual ACM Symposium on Applied Computing;2016-04-04
3. Approaches to interpreter composition;Computer Languages, Systems & Structures;2015-12
4. Establishing Operational Models for Dynamic Compilation in a Simulation Platform;Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering;2015
5. Efficient hosted interpreters on the JVM;ACM Transactions on Architecture and Code Optimization;2014-02