
6 Accelerating MATLAB
®
Performance
1.3.1 Pareto’s Principle and the Law of Diminishing Returns
In each step of the tuning cycle, we should use Pareto’s principle
12
(also known as the
“80–20 rule”*) to concentrate our energy on the 20% of the code that accounts for 80% of the
application’s time. Within that 20% of code, only about 20% (i.e., altogether just 4%–5% of
the total program code) accounts for 80% of the code that can actually be tuned to improve
performance. In practice this means that we should concentrate on the top 3–5 time hog-
ging functions (as reported by the proling — see Chapter 2), and within them only on
the top 3–5 hoggi ...