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

Thread Subject:
porting .m to c++ or xcode worthwhile?

Subject: porting .m to c++ or xcode worthwhile?

From: Jveer

Date: 17 Jun, 2009 12:46:01

Message: 1 of 3

in terms of processing speed for simulations, is it worthwhile to port code written on matlab to c++ or xcode?

will they run much faster if ported compared to compiled using the the matlab compiler?

Subject: porting .m to c++ or xcode worthwhile?

From: Rune Allnor

Date: 17 Jun, 2009 13:17:24

Message: 2 of 3

On 17 Jun, 14:46, "Jveer " <jv...@jveer.com> wrote:
> in terms of processing speed for simulations, is it worthwhile to port code written on matlab to c++ or xcode?

Yes. At least to C++.

> will they run much faster if ported compared to compiled using the the matlab compiler?

Expect speeds to increase by 10-50x, if you let a skilled [*]
C++ programmer do the porting. The reason is that C++ is
more efficient on most (but not all) internal details, and
encourage the use of more flexible data structures:

http://groups.google.no/group/comp.soft-sys.matlab/msg/0b6492cb37b5d7fd?hl=no

Rune

[*] It takes time to learn C++. Bad C++ can be as bad
    matlab, or even worse, what run-time is concerned.

Subject: porting .m to c++ or xcode worthwhile?

From: Jveer

Date: 17 Jun, 2009 13:37:01

Message: 3 of 3

oh! even if the matlab code is as optimized as it can be??

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us