MATLAB Code Can Easily Run Much Faster Than You Think!
From the series: MathWorks Research Summit
Yair Altman, Undocumented MATLAB
MATLAB® is often viewed, incorrectly, as an inherently slow programming environment. Much of this misconception arises from suboptimal user code, as well as inefficient use of available MATLAB tools and functions. Moreover, many users assume that MATLAB code can only be sped up using vectorization and parallelization, and in cases where these are not possible or applicable for any reason, then nothing significant can be done to improve the code’s run time.
To dispel these misconceptions, Yair presents a small taste of the numerous potential speedup methods that can be applied to MATLAB code in a short whirlwind overview of several diverse speedup techniques. The presentation showcases several common use cases where simple MATLAB code changes and techniques can result in significant run-time speedups.
In his presentation, Yair discusses using the built-in Profiler tool in MATLAB, as well as simple yet effective loop optimizations, data caching, graphics rendering and interaction, and various tradeoffs that should be considered with code optimization. MATLAB users who require their code to run faster can use the presented techniques as a starting point for code optimization, keeping in mind that many other speedup techniques can be applied.
Published: 17 Mar 2023