Abstract
Optionally typed languages enable direct performance comparisons between untyped and type annotated source code. We present a comprehensive performance evaluation of two different JIT compilers in the context of ActionScript, a production-quality optionally typed language. One JIT compiler is optimized for quick compilation rather than JIT compiled code performance. The second JIT compiler is a more aggressively optimizing compiler, performing both high-level and low-level optimizations.
We evaluate both JIT compilers directly on the same benchmark suite, measuring their performance changes across fully typed, partially typed, and untyped code. Such evaluations are especially relevant to dynamically typed languages such as JavaScript, which are currently evaluating the idea of adding optional type annotations. We demonstrate that low-level optimizations rarely accelerate the program enough to pay back the investment into performing them in an optionally typed language. Our experiments and data demonstrate that high-level optimizations are required to improve performance by any significant amount.
- ActionScript 3.0 Overview - Adobe Developer Connection - http://www.adobe.com/devnet/actionscript/articles/actionscript3_overview.html.Google Scholar
- dynamic (C# Reference) - http://msdn.microsoft.com/en-us/library/dd264741.aspx#Y669.Google Scholar
- LIR - MDC - https://developer.mozilla.org/en/Nanojit/LIR.Google Scholar
- LLVM Assembly Language Reference Manual - http://llvm.org/docs/LangRef.html.Google Scholar
- NanoJIT - MDC - https://developer.mozilla.org/En/Nanojit.Google Scholar
- Open Source Framework, Web Application Software Development - Flex - Adobe - http://www.adobe.com/products/flex/.Google Scholar
- Proposed ECMAScript 4 Edition - Language Overview - http://www.ecmascript.org/es4/spec/overview.pdf.Google Scholar
- Standard ECMA-262. 3rd Edition - December 1999. http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-362.pdf.Google Scholar
- Sunspider JavaScript Benchmark - http://www.webkit.org/perf/sunspider/sunspider.html.Google Scholar
- Tamarin - MDC - https://developer.mozilla.org/en/Tamarin.Google Scholar
- The WebKit Open Source Project - http://webkit.org/.Google Scholar
- unladen-swallow - Project Hosting on Google Code - http://code.google.com/p/unladen-swallow/.Google Scholar
- Unladen Swallow Retrospective - QINSB is not a Software Blog - http://qinsb.blogspot.com/2011/03/unladen-swallow-retrospective.html.Google Scholar
- V8 - Project Hosting on Google Code - http://code.google.com/p/v8/.Google Scholar
- V8 Benchmark Suite - http://v8.googlecode.com/svn/data/benchmarks/current/run.html.Google Scholar
- M. Abadi, L. Cardelli, B. Pierce, and G. Plotkin. Dynamic Typing in a Statically Typed Language. ACM Transactions on Programming Languages and Systems, 13(2):237--268, 1991. Google Scholar
Digital Library
- O. Agesen and U. Hölzle. Type Feedback vs. Concrete Type Inference: A Comparison of Optimization Techniques for Object-Oriented Languages. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 91--107. ACM, 1995. Google Scholar
Digital Library
- B. Alpern, C. Attanasio, J. Barton, M. Burke, P. Cheng, J. Choi, A. Cocchi, S. Fink, D. Grove, M. Hind, et al. The Jalapeno Virtual Machine. IBM Systems Journal, 2000. Google Scholar
Digital Library
- C. Anderson, P. Giannini, and S. Drossopoulou. Towards Type Inference for JavaScript. In Proceedings of the European Conference on Object-Oriented Programming, pages 428--452. Springer, 2005. Google Scholar
Digital Library
- G. Bracha. Pluggable Type Systems. In OOPSLA Workshop on Revival of Dynamic Languages, 2004.Google Scholar
- C. Chambers and D. Ungar. Customization: Optimizing Compiler Technology for SELF, a Dynamically-Typed Object-Oriented Programming Language. In Proceedings of the Symposium on Interpreters and Interpretive Techniques, pages 146--160. ACM, 1989. Google Scholar
Digital Library
- C. Click and K. Cooper. Combining Analyses, Combining Optimizations. ACM Transactions on Programming Languages and Systems, 17(2):181--196, 1995. Google Scholar
Digital Library
- R. Cytron, J. Ferrante, B. Rosen, M. Wegman, and F. Zadeck. Efficiently Computing Static Single Assignment Form and the Control Dependence Graph. ACM Transactions on Programming Languages and Systems, 13(4):451--490, 1991. Google Scholar
Digital Library
- L. Damas and R. Milner. Principal Type-Schemes for Functional Programs. In Proceedings of the ACM SIGPLAN Symposium on Principles of Programming Languages, pages 207--212. ACM, 1982. Google Scholar
Digital Library
- A. Gal, M. Bebenita, M. Chang, and M. Franz. Making the Compilation "Pipeline" Explicit: Dynamic Compilation Using Trace Tree Serialization. Technical Report CS-TR-07-12, 2008.Google Scholar
- A. Gal, B. Eich, M. Shaver, D. Anderson, D. Mandelin, M. Haghighat, B. Kaplan, G. Hoare, B. Zbarsky, J. Orendorff, et al. Trace-Based Just-In-Time Type Specialization for Dynamic Languages. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 465--478. ACM, 2009. Google Scholar
Digital Library
- C. Garrett, J. Dean, D. Grove, and C. Chambers. Measurement and Application of Dynamic Receiver Class Distributions. Technical Report CSE-TR-94-03-05, University of Washington, 1994.Google Scholar
- J. Gronski, K. Knowles, A. Tomb, S. Freund, and C. Flanagan. Sage: Hybrid Checking for Flexible Specifications. In Scheme and Functional Programming Workshop, pages 93--104, 2006.Google Scholar
- U. Hölzle, C. Chambers, and D. Ungar. Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches. In Proceedings of the European Conference on Object-Oriented Programming, pages 21--38. Springer, 1991. Google Scholar
Digital Library
- U. Hölzle and D. Ungar. Optimizing Dynamically-Dispatched Calls with Run-Time Type Feedback. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 326--336. ACM, 1994. Google Scholar
Digital Library
- T. Kotzmann, C. Wimmer, H. Mössenböck, T. Rodriguez, K. Russell, and D. Cox. Design of the Java HotSpot#8482; Client Compiler for Java 6. ACM Transactions on Architecture and Code Optimization, 5(1):1--32, 2008. Google Scholar
Digital Library
- C. Lattner and V. Adve. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In Proceedings of the International Symposium on Code Generation and Optimization, pages 75--. Published by the IEEE Computer Society, 2004. Google Scholar
Digital Library
- H. Lee, D. von Dincklage, A. Diwan, and J. Moss. Understanding the Behavior of Compiler Optimizations. Software: Practice and Experience, 36(8):835--844, 2006. Google Scholar
Digital Library
- R. Milner. A Theory of Type Polymorphism in Programming. Journal of Computer and System Sciences, 17(3):348--375, 1978.Google Scholar
Cross Ref
- M. Odersky, P. Altherr, V. Cremet, B. Emir, S. Maneth, S. Micheloud, N. Mihaylov, M. Schinz, E. Stenman, and M. Zenger. An overview of the scala programming language. Technical report, 2004.Google Scholar
- J. Palsberg and M. Schwartzbach. Object-Oriented Type Inference. Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 146--161, 1991. Google Scholar
Digital Library
- M. Poletto and V. Sarkar. Linear Scan Register Allocation. ACM Transactions on Programming Languages and Systems, 21(5):895--913, 1999. Google Scholar
Digital Library
- J. Siek and W. Taha. Gradual Typing for Functional Languages. In Scheme and Functional Programming, pages 81--92, 2006.Google Scholar
- J. Siek and W. Taha. Gradual Typing for Objects. In Proceedings of the European Conference on Object-Oriented Programming, pages 2--27. Springer, 2007. Google Scholar
Digital Library
- J. Siek and M. Vachharajani. Gradual Typing with Unification-Based Inference. In Proceedings of the 2008 Symposium on Dynamic Languages, pages 7:1--7:12. ACM, 2008. Google Scholar
Digital Library
- S. Thatte. Quasi-Static Typing. In Proceedings of the 17th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 207--212. ACM, 1989. Google Scholar
Digital Library
- S. Thatte. Type Inference with Partial Types. In Theoretical Computer Science, pages 615--629. Elsevier, 1994.Google Scholar
- P. Thiemann. Towards a Type System for Analyzing Javascript Programs. In Programming Languages and Systems, pages 408--422. Springer, 2005. Google Scholar
Digital Library
- S. Tobin-Hochstadt and M. Felleisen. Interlanguage Migration: From Scripts to Programs. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 964--974. ACM, 2006. Google Scholar
Digital Library
- S. Tobin-Hochstadt and M. Felleisen. The Design and Implementation of Typed Scheme. In Proceedings of the ACM SIGPLAN Symposium on Principles of Programming Languages, pages 395--406. ACM, 2008. Google Scholar
Digital Library
Index Terms
The impact of optional type information on jit compilation of dynamically typed languages
Recommendations
JIT compilation policy for modern machines
OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applicationsDynamic or Just-in-Time (JIT) compilation is crucial to achieve acceptable performance for applications (written in managed languages, such as Java and C#) distributed as intermediate language binary codes for a virtual machine (VM) architecture. Since ...
The impact of optional type information on jit compilation of dynamically typed languages
DLS '11: Proceedings of the 7th symposium on Dynamic languagesOptionally typed languages enable direct performance comparisons between untyped and type annotated source code. We present a comprehensive performance evaluation of two different JIT compilers in the context of ActionScript, a production-quality ...
Compile-time meta-programming in a dynamically typed OO language
DLS '05: Proceedings of the 2005 symposium on Dynamic languagesCompile-time meta-programming allows programs to be constructed by the user at compile-time. Although LISP derived languages have long had such facilities, few modern languages are capable of compile-time meta-programming, and of those that do many of ...







Comments