Related Questions

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Does the MATLAB Compiler speed up the execution time of MATLAB functions?

Asked by MathWorks Support Team on 30 Dec 2010
Latest activity Commented on by Image Analyst

Image Analyst (view profile)

on 18 Jun 2014

I would like to speed up functions written in MATLAB code. I would like to know if MATLAB Compiler can improve performance of code.

0 Comments

Products

2 Answers

Answer by MathWorks Support Team on 18 Feb 2015
Accepted answer

Deployed components generated from MATLAB Compiler or its related products do not improve performance of MATLAB code.  This is because MATLAB Compiler works by running the same MATLAB code (although encrypted) on an installed runtime, and does not change the nature of the code.  As such, the deployed MATLAB code will run with similar speed as if running on MATLAB desktop. 

However, often there are overheads associated with deployed components.  If you deploy a standalone executable, there will be a startup delay while the executable is starting up and the runtime is loaded.  If you deploy a library, there may be overhead associated with data marshaling.

The main purpose of the MATLAB Compiler products is to provide deployment options for customers by creating standalone executables or creating libraries that can be loaded into other frameworks.  For improving speed, using MATLAB Coder products, MATLAB Parallel Computing Toolbox products or tuning your MATLAB code specifically for performance are better options.

0 Comments

Answer by subha

subha (view profile)

on 18 Jun 2014

How to use matlab compiler for my source code

1 Comment

Image Analyst

Image Analyst (view profile)

on 18 Jun 2014

You need the MATLAB Compiler product. It's an add-on product that you need to purchase. Contact the Mathworks to purchase it.

subha

subha (view profile)

Contact us