Speedup and Efficiency for Parallel Work
Speedup compares elapsed time on a baseline with another configuration. Efficiency divides that speedup by the number of workers relative to a one-worker baseline.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Compute a practical ratio
If a job takes twelve seconds on one worker and four on four workers, speedup is three and efficiency is \(3/4\). Worker count and throughput describes what other measurements might matter.
Keep the numerator comparable
Use the same output and work definition for both configurations. Sometimes the one-worker version uses a different algorithm, which should be stated. See paired measurements.[1]
Compute both ratios with a shared baseline
A workload takes eighty seconds on one worker and twenty-five on four. Speedup is \(80/25=3.2\), and efficiency relative to four ideal workers is \(3.2/4=0.8\). Report times as well as ratios so the baseline is explicit. See why some time cannot parallelize.
Serial time 80 s
Parallel time 25 s on 4 workers
Speedup 3.2×
Efficiency 80%
Compare equivalent work and resource units
Different algorithms can do different total work. Check returned values and task counts first. Threads, cores and machines also represent different resource units. State which one the efficiency uses.