What is Speedup?

Execution time before an improvement divided by the time after; a value of 2 means twice as fast.

Field: Performance Analysis

Japanese name: 速度向上率

Measuring speedup correctly

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 only1.51.2=1.251.5 ÷ 1.2 = 1.25.

Amdahl's law

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.

Gustafson's law and parallel efficiency

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.

Reading speedup claims

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.

Try it: questions about Speedup

If 90% of a program can be parallelized, what is the theoretical maximum speedup when it runs on an unlimited number of processors?

  1. A10 times
  2. B90 times
  3. CInfinite
Show answer and explanation

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.

How is speedup, which expresses a performance improvement, calculated?

  1. AExecution time before ÷ execution time after
  2. BExecution time after ÷ execution time before
  3. CExecution time before − execution time after
Show answer and explanation

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.

FAQ

How do you calculate speedup?

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.

What is the difference between Amdahl's law and Gustafson's law?

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.

Can speedup be greater than the number of processors?

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.

Questions that mention Speedup (10)

Speedup appears in 12 practice questions across 4 topics, including Performance Analysis, CPUs and architecture, Multicore & Synchronization.

  1. A part taking 50% of total time is made 4× faster. What is the overall speedup (Amdahl's law)?
  2. In a program processing large amounts of data, which improvement is most likely to give the largest speedup?
  3. Which is NOT a reason a parallel program fails to scale as cores are added?
  4. Which statement about pruning neural networks is correct?
  5. A CPU design change raises clock frequency 1.5× but also raises CPI 1.2× (instruction count unchanged). How many times faster is execution?
  6. You want to make an entire task 2× faster by speeding up only the part that takes 60% of the time. How many times faster must that part become?
  7. What idea does Gustafson's law express?
  8. What is the most appropriate method for examining a parallel program's scalability?
  9. Running in parallel on 8 cores is 6× faster than on 1 core. What is the parallel efficiency?
  10. When evaluating a claim that "the new method is 100× faster," what is most important to check?

Books on Performance Analysis Ad

As an Amazon Associate I earn from qualifying purchases.

Semiconductor, Electronics and Computing Calculators

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.

Back to the glossary