Script Speedup, Parallelization and Algorithms

Course Description

This course describes techniques used to improve the execution speed of scripts you develop, using standard features of Matlab, and using the Parallel Computing Toolbox. We discuss when performance tuning is appropriate, how to find the bottleneck code sections, and possible remedies. For computers with multi-core processors the Parallel Computing Toolbox offers significant speed-ups over single core execution speeds. We also discuss the performance of the standard Solo/PLS_Toolbox algorithms and how their execution speed scales with dataset size. 

The course includes hands-on computer time for participants to work example problems using PLS_Toolbox or Solo.


Chemometrics I--PCA and Chemometrics II--Regression and PLS or equivalent experience.

Course Outline

  1. Overview of performance speed-up
    1.1 When to optimize Matlab code for performance?
    1.2 How to improve code performance
    1.3 Execution speed of Solo/PLS_Toolbox algorithms for regression, classification, and decomposition
  2. Scripting speed-up techniques
    2.1 Profiling code to find slow sections; and tic/toc
    2.2 Vectorization (implicit parallelization)
       Matrix algebra is parallel
       Reorganizing the calculation
    2.3 Memory/Performance trade-off
  3. Parallel Computing Toolbox
    3.1 Parallelization (explicit) using the Parallel Computing Toolbox
    3.2 Graphics Processing Units (GPU) have hundreds of compute cores but limited applications
  4. Performance of standard Solo/PLS_Toolbox methods, GUI or command line.
    4.1 Complexity performance estimates for each method, theoretical and measured
    4.2 Comparison of dataset analysis times
    4.3 Tips for faster analysis 
  5. Other performance topics
    5.1 External libraries (Java, Dll,...)
    5.2 Compiled C/C++/Fortran functions using MEX 
    5.3 Graphics.