Techniques for efficient MATLAB-to-C compilation
João Bispo, Luís Paulo Reis, João M. P. Cardoso · 2015
MATLAB to C translation is foreseen to raise the overall abstrac-tion level when mapping computations to embedded systems (pos-sibly consisting of software and hardware components), and thus for increasing productivity and for providing an automated model-driven design-flow. This paper describes recent work developed in the context of MATISSE, a MATLAB to C compiler targeting embedded systems. We introduce several techniques to allow the efficient generation of C code, such as weak types, primitives and matrix views. We evaluate the compiler with a set of 9 publicly available benchmarks, targeting both embedded systems and a desktop system. We compare the execution time of the generated C code with the original code running on MATLAB, achieving a geometric mean speedup of 8.1x, and qualitatively compare our results with the performance of related approaches. The use of the new techniques allowed the compiler to achieve performance im-provements of 46% on average.