Title
Optimizing MATLAB through just-in-time specialization
Abstract
Scientists are increasingly using dynamic programming languages like Matlab for prototyping and implementation. Effectively compiling Matlab raises many challenges due to the dynamic and complex nature of Matlab types. This paper presents a new JIT-based approach which specializes and optimizes functions on-the-fly based on the current types of function arguments. A key component of our approach is a new type inference algorithm which uses the run-time argument types to infer further type and shape information, which in turn provides new optimization opportunities. These techniques are implemented in McVM, our open implementation of a Matlab virtual machine. As this is the first paper reporting on McVM, a brief introduction to McVM is also given. We have experimented with our implementation and compared it to several other Matlab implementations, including the Mathworks proprietary system, McVM without specialization, the Octave open-source interpreter and the McFor static compiler. The results are quite encouraging and indicate that specialization is an effective optimization—McVM with specialization outperforms Octave by a large margin and also sometimes outperforms the Mathworks implementation.
Year
DOI
Venue
2010
10.1007/978-3-642-11970-5_4
CC
Keywords
Field
DocType
new type inference algorithm,matlab type,mathworks proprietary system,mathworks implementation,new optimization opportunity,optimizing matlab,matlab implementation,octave open-source interpreter,open implementation,just-in-time specialization,matlab virtual machine,new jit-based approach,virtual machine,type inference
Octave,Open implementation,Programming language,Virtual machine,MATLAB,Computer science,Type inference,Compiler,Implementation,Interpreter
Conference
Volume
ISSN
ISBN
6011
0302-9743
3-642-11969-7
Citations 
PageRank 
References 
26
1.40
19
Authors
3
Name
Order
Citations
PageRank
Maxime Chevalier Boisvert1413.86
Laurie Jane Hendren22617199.08
Clark Verbrugge341139.15