MaJIC: Compiling MATLAB for speed and responsiveness George Almasi and David Padua
MaJIC Overview MAJIC: (MAtlab Just-In-Time Compiler) interactive and fast - combination interpreter/JIT compiler - speculative ahead-of-time compilation - builds on top of FALCON techniques
Compiler Techniques in MaJIC Analysis Compile only code that takes time to execute (loops) type analysis and value/limit propagation recompile only when source has changed Code Generation naïve (per AST node) JIT code generation uses built-in MATLAB functions where possible average compile time: 20ms per line of MATLAB source
MaJIC Compiler
MaJIC Software Architecture
Events in the Code Repository
Performance
Conclusion Provided high performance to the Matlab integrated environment: > JIT Compilation > Speculative Compilation
Discussion What are the downfalls of this approach? Can it be applied to C/Scale compiler? Future optimizations?