Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: A stupid question

Joel Kolstad wrote:

"Roy Schestowitz" <newsgroups@schestowitz.com> wrote in message cs23u4$171u$1@godfrey.mcc.ac.uk">news:cs23u4$171u$1@godfrey.mcc.ac.uk...

Yes, it is much slower, but that's the inevitable disadvantage of using
high-level programming languages. It's a trade-off between abstraction,
i.e. ease of development and the resulting speed.

In the case of Matlab, I'd say it's slow mainly because of the way it's interpreted. C++ is arguably as 'high level' or even higher than Matlab (C++ having far more powerful object-oriented features, but Matlab having better handling of multiple arguments and return values, for instance...), yet it's much faster than equivalent Matlab code.

At least on Windows platforms, there is support for OpennGL graphics, wich should speed it up. Other than that, I don't know of any hardware acceleration.

It is true that MATLAB is sometimes slower than a corresponding C/C++ program, but it very much depends on the implementation. If you use matrix operations and built-in functions, rather than looping (like you probably would in C), I'd say the MATLAB implementation will be both faster and numerically more stable.

Also, there's the issue of simulation time vs. development time. I'd rather sit and wait for the simulation for one day (eating donuts) than hunting seg. faults in C ;)


[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index