Compiler techniques for MATLAB programs

  • Authors:
  • Luiz A. DeRose

  • Affiliations:
  • -

  • Venue:
  • Compiler techniques for MATLAB programs
  • Year:
  • 1996

Quantified Score

Hi-index 0.00

Visualization

Abstract

This thesis addresses the issues of translating an interactive array language, such as MATLAB into a traditional compiled language, such as Fortran, in order to achieve better performance. It describes the main techniques, developed for our MATLAB-to-Fortran 90 compiler, to extract information from the high-level semantics of MATLAB for the generation of high-performance code. To perform the translation, an inference mechanism is necessary to generate the declarations for a typed language, to select the appropriate functions and operations, and to allocate the necessary space. The inference mechanism developed for this MATLAB-to-Fortran 90 compiler combines static and dynamic inference methods for intrinsic type, shape, rank, and structural inference. This inference is enhanced with value propagation and symbolic-dimension propagation analyses. The experimental results, which compare compiled generated programs with the corresponding interpreted MATLAB execution, show that the compiler can generate code that performs more than 1000 times faster than MATLAB on an SGI Power Challenge, and as fast as the corresponding hand-written Fortran 90 programs. When compared with the performance of C-MEX files generated by the MathWorks MATLAB compiler, we observed that, for our tests, the Fortran 90 programs ran faster than the corresponding C-MEX programs on an SGI Power Challenge and on a Sun SPARCstation 10. This better performance is mainly attributed to our enhanced inference mechanism.