Font Size: a A A

McVM: An optimizing virtual machine for the MATLAB programming language

Posted on:2010-10-03Degree:M.ScType:Thesis
University:McGill University (Canada)Candidate:Chevalier-Boisvert, MaximeFull Text:PDF
GTID:2448390002982201Subject:Computer Science
Abstract/Summary:
In recent years, there has been an increase in the popularity of dynamic languages such as Python, Ruby, PHP, JavaScript and MATLAB. Programmers appreciate the productivity gains and ease of use associated with such languages. However, most of them still run in virtual machines which provide no Just-In-Time (JIT) compilation support, and thus perform relatively poorly when compared to their statically compiled counterparts. While the reference MATLAB implementation does include a built-in compiler, this implementation is not open sourced and little is known about its internal workings. The McVM project has focused on the design and implementation of an optimizing virtual machine for a subset of the MATLAB programming language.;One of the main contributions of this project is to provide an alternative implementation of the MATLAB programming language. There is already an open source MATLAB interpreter (GNU Octave), but our implementation also includes an optimizing JIT compiler and will be open sourced under the BSD license. McVM aims to become a viable implementation for end-users, but could also see use in the compiler research community as a testbed for dynamic language optimizations. In addition to the contribution of the McVM framework itself, we also contribute the design and implementation of a novel just-in-time type-based program specialization system aimed at dynamic languages.;The novel specialization system implemented in McVM shows much promise in terms of potential speed improvements, yielding performance gains up to 3 orders of magnitude faster than competing implementations such as GNU Octave. It is also easily adaptable to other dynamic programming languages such as Python, Ruby and JavaScript. The investigation of performance issues we make in this thesis also suggests future research directions for the design of dynamic language compilers of the future.;Virtual machines and JIT compilers can benefit from advantages that static compilers do not have. It is possible for virtual machines to make use of more dynamic information than static compilers have access to, and thus, to implement optimization strategies that are more adapted to dynamic languages. Through the McVM project, some possible avenues to significantly improve the performance of dynamic languages have been explored. Namely, a just-in-time type-based program specialization scheme has been implemented in order to take advantage of dynamically available type information.
Keywords/Search Tags:MATLAB programming, Dynamic, Language, Mcvm, Virtual, Optimizing
Related items