Font Size: a A A

Efficient Analysis and Optimization of Dynamically Typed Languages

Posted on:2013-04-02Degree:Ph.DType:Dissertation
University:University of California, IrvineCandidate:Chang, MasonFull Text:PDF
GTID:1452390008475397Subject:Computer Science
Abstract/Summary:
The performance of virtual machines for dynamically typed programming languages are slower than their statically typed counterparts. A major performance bottleneck is due to the lack of type information at compile time, forcing the compiler to emit type generic code. The lack of typing creates a performance overhead that the whole system must compensate for. For example, many primitive operations such as addition, are overloaded based on the types of the input operands. Each addition must resolve the types of the input operands, dispatch to an appropriate implementation, e.g., integer addition, and finally perform the addition. This overhead of discovering the types of values degrades overall runtime performance.;We present novel techniques and a holistic evaluation of a virtual machine that reduce or completely eliminate the overhead of discovering type information at runtime. We explore different intermediate representations which facilitate type information based optimizations. We investigate various just-in-time (JIT) code generation strategies, including a novel trace-based approach, optimizing untyped code. Next, we analyze and evaluate when and how to perform traditional compiler optimizations in the context of a dynamically typed language. Our results enable our JIT compiler to generate machine code that executes up to 5.7x faster at runtime in a production virtual machine, closing the performance gap between virtual machines for dynamic and statically typed languages.
Keywords/Search Tags:Typed, Performance, Virtual, Machine
Related items