Module 18: Loop Optimizations
  Lecture 35: Amdahl’s Law
 


Loop Optimizations

Amdahl’s Law

  • Determines speed up
  • α: fraction of code is scalar
  • 1-α: fraction of code which is parallelizable
  • 1 operation per unit time is scalar unit
  • ζoperations per unit time in parallel units
  • where 0 ≤ α≤ 1, and ζ≥1
α
0
0.1
0.25
0.5
1
ζ=10
10
5.26
3.08
1.82
1
ζ=20
20
6.9
3.48
1.90
1

  • To achieve any significant speedup, parallel code must be greater then 90%
  • Most of the execution time is spent in small sections of code. So concentrate on critical sections (loops)
  • Loop parallelization is beneficial
  • Inner most loop parallelization is the most beneficial
  • Sscalar component of the code is the limiting factor