How can I make Matlab Compiler run faster?
Asked Answered
S

2

6

How can I make the Matlab Compiler run faster? It takes ages for it to make a sensible program.

I am currently using Microsoft Visual C++ 2008 SP1 in c:\Program Files (x86)\Microsoft Visual Studio 9.0 in mbuild -setup

Slabber answered 19/12, 2011 at 10:6 Comment(1)
I agree, it takes for ever (with linux too)Emotional
A
10

Here's one tip - a large part of the time taken by MATLAB Compiler is in dependency checking for the code you're compiling. If you have a large number of toolboxes on the path, this can take a long time. You can change the list of toolboxes on the path from the Settings menu in deploytool. Make sure that only the toolboxes your code actually uses are selected.

It may still take ages, but this can make it take slightly less ages.

Admittedly answered 19/12, 2011 at 10:36 Comment(2)
Think of it as an opportunity to take a well-earned break - maybe a nice coffee or a short walk. You deserve it.Admittedly
Reminds me of when I was using addpath a bit like the C include statement and putting at the top of functions called multiple times. I discovered this one line was taking up around 80% of execution time...Superaltar
Z
-2

Usual techniques for making anything compile faster as usually pretty cost-effective:

  • Faster CPU
  • More memory
  • SSD

I don't think that the parallel computing toolbox will help you because the MATLAB compiler isn't listed as having built-in support on the website even though the coder products do.

Zeiler answered 19/12, 2011 at 14:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.