What is Speedup?
Execution time before an improvement divided by the time after; a value of 2 means twice as fast.
Japanese name: 速度向上率
Execution time before an improvement divided by the time after; a value of 2 means twice as fast.
Japanese name: 速度向上率
Speedup is time before divided by time after: a task that drops from 10 s to 4 s has a speedup of 2.5, the same change as "60% less time", and the two phrasings are easily confused. Because execution time equals instruction count × cycles per instruction (CPI) ÷ clock frequency, a single factor can mislead. Raising frequency 1.5 times while CPI rises 1.2 times, for example because a deeper pipeline pays larger branch penalties, gives a real speedup of only.
If a fraction p of the run time is accelerated by a factor s, the overall speedup is 1/((1 − p) + p/s). Making half the program 4 times faster gives only 1.6, and no amount of acceleration on that half can exceed 2. To double overall speed by improving a 60% portion, that portion must become 6 times faster. For parallel computing, s becomes the processor count N: with 90% parallel code the limit is 10 regardless of N, and 10 processors give only about 5.3. The lesson is to attack the largest share of time first.
Amdahl's law assumes a fixed problem size, called strong scaling. Gustafson's law assumes the problem grows with processor count, as when a simulation grid is refined, so the parallel part grows, the serial fraction shrinks and speedup stays close to N; this is weak scaling. Parallel efficiency is speedup divided by core count: 6 times on 8 cores is 75%. Losses come from serial code, lock and barrier waits, load imbalance, cache-line bouncing from shared or falsely shared data, and memory bandwidth. Occasionally speedup exceeds N because each core's share of data fits in cache.
A speedup is only as meaningful as its baseline. The fair reference for parallel scaling is the fastest serial version, not the parallel code run on one core, and comparisons must use the same data size, accuracy and measurement scope, such as whether data transfer time is included. Algorithmic changes often dwarf hardware gains: replacing an n² method with n log n at a million elements cuts work by a factor of about 50,000. Conversely, removing operations does not guarantee speedup, as with unstructured pruning whose scattered zeros hardware cannot exploit efficiently.
Answer: A. 10 times
Amdahl's law gives speedup as 1/((1 − p) + p/N) for parallel fraction p and N processors. With p = 0.9 the limit as N grows is 1/0.1 = 10×, and even N = 10 yields only about 5.3×. Even a small serial portion caps the speedup, so reducing it is crucial. Gustafson's law takes the complementary view of scaling the problem size to grow the parallel part.
Answer: A. Execution time before ÷ execution time after
Speedup is the time before divided by the time after. A task that took 10 seconds and now takes 4 has a speedup of 10 ÷ 4 = 2.5×. "60% shorter" and "2.5× faster" describe the same change but are easily confused. For parallelization, speedup is often shown relative to the same program run on one core. For a fair comparison, however, the baseline should be the time of the fastest serial (non-parallel) program.
Divide the execution time before the change by the execution time after it. For parallel programs, divide the best single-core time by the time on N cores.
Amdahl's law fixes the problem size, so the serial fraction caps speedup no matter how many processors are added. Gustafson's law lets the problem grow with the processor count, so speedup can scale nearly linearly.
Yes, occasionally. Superlinear speedup can happen when splitting the data lets each core's portion fit in its cache, though most programs fall below linear scaling because of serial work and synchronization.
Speedup appears in 12 practice questions across 4 topics, including Performance Analysis, CPUs and architecture, Multicore & Synchronization.
As an Amazon Associate I earn from qualifying purchases.
This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.