ArticleslgStudy

computer science

Speedup

Speedup is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Speedup rather than just read about it. In short: In computer architecture, speedup is a number that measures the relative performance of two systems processing the same problem. More technically, it is the improvement in speed of execution of a task executed on two similar architectures with different resources.

Key takeaways

  • Speedup belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Speedup to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Speedup from memory before moving on to harder problems.

Reference excerpt

In computer architecture, speedup is a number that measures the relative performance of two systems processing the same problem. More technically, it is the improvement in speed of execution of a task executed on two similar architectures with different resources. The notion of speedup was established by Amdahl's law, which was particularly focused on parallel processing. However, speedup can be used more generally to show the effect on performance after any resource enhancement.

Definitions Speedup can be defined for two different types of quantities: latency and throughput. Latency of an architecture is the reciprocal of the execution speed of a task:

L=1v=TW, where

v is the execution speed of the task; T is the execution time of the task; W is the execution workload of the task. Throughput of an architecture is the execution rate of a task:

Q=ρvA=ρAWT=ρAL, where

ρ is the execution density (e.g., the number of stages in an instruction pipeline for a pipelined architecture); A is the execution capacity (e.g., the number of processors for a parallel architecture). Latency is often measured in seconds per unit of execution workload. Throughput is often measured in units of execution workload per second. Another unit of throughput is instructions per cycle (IPC) and its reciprocal, cycles per instruction (CPI), is another unit of latency. Speedup is dimensionless and defined differently for each type of quantity so that it is a consistent metric.

Speedup in latency Speedup in latency is defined by the following formula:

Slatency=L1L2=T1W2T2W1, where

Slatency is the speedup in latency of the architecture 2 with respect to the architecture 1; L1 is the latency of the architecture 1; L2 is the latency of the architecture 2. Speedup in latency can be predicted from Amdahl's law or Gustafson's law.

Speedup in throughput Speedup in throughput is defined by the formula:

Sthroughput=Q2Q1=ρ2A2T1W2ρ1A1T2W1=ρ2A2ρ1A1Slatency, where

Sthroughput is the speedup in throughput of the architecture 2 with respect to the architecture 1; Q1 is the throughput of the architecture 1; Q2 is the throughput of the architecture 2.

Examples

Using execution times We are testing the effectiveness of a branch predictor on the execution of a program. First, we execute the program with the standard branch predictor on the processor, which yields an execution time of 6.75 seconds. Next, we execute the program with our modified (and hopefully improved) branch predictor on the same processor, which produces an execution time of 4.50 seconds. In both cases the execution workload is the same. Using our speedup formula, we know

Slatency=LoldLnew=6.75 s4.50 s=1.5. Our new branch predictor has provided a 1.5x speedup over the original.

Using cycles per instruction and instructions per cycle We can also measure speedup in cycles per instruction (CPI) which is a latency. First, we execute the program with the standard branch predictor, which yields a CPI of 3. Next, we execute the program with our modified branch predictor, which yields a CPI of 2. In both cases the execution workload is the same and both architectures are not pipelined nor parallel. Using the speedup formula gives

Slatency=LoldLnew=3 CPI2 CPI=1.5. We can also measure speedup in instructions per cycle (IPC), which is a throughput and the inverse of CPI. Using the speedup formula gives

Sthroughput=QnewQold=0.5 IPC0.33 IPC=1.5. We achieve the same 1.5x speedup, though we measured different quantities.

Additional details Let S be the speedup of execution of a task and s the speedup of execution of the part of the task that benefits from the improvement of the resources of an architecture. Linear speedup or ideal speedup is obtained when S = s. When running a task with linear speedup, doubling the local speedup doubles the overall speedup. As this is ideal, it is considered very good scalability. Efficiency is a metric of the utilization of the resources of the improved system defined as

η=Ss. Its value is typically between 0 and 1. Programs with linear speedup and programs running on a single processor have an efficiency of 1, while many difficult-to-parallelize programs have efficiency such as 1/ln(s) that approaches 0 as the number of processors A = s increases. In engineering contexts, efficiency curves are more often used for graphs than speedup curves, since

all of the area in the graph is useful (whereas in speedup curves half of the space is wasted); it is easy to see how well the improvement of the system is working; there is no need to plot a "perfect speedup" curve. In marketing contexts, speedup curves are more often used, largely because they go up and to the right and thus appear better to the less-informed.

Super-linear speedup Sometimes a speedup of more than A when using A processors is observed in parallel computing, which is called super-linear speedup. Super-linear speedup rarely happens and often confuses beginners, who believe the theoretical maximum speedup should be A when A processors are used. One possible reason for super-linear speedup in low-level computations is the cache effect resulting from the different memory hierarchies of a modern computer: in parallel computing, not only do the numbers of processors change, but so does the size of accumulated caches from different processors. With the larger accumulated cache size, more or even all of the working set can fit into caches and the memory access time reduces dramatically, which causes the extra speedup in addition to that from the actual computation. An analogous situation occurs when searching large datasets, such as the genomic data searched by BLAST implementations. There the accumulated RAM from each of the nodes in a cluster enables the dataset to move from disk into RAM thereby drastically reducing the time required by e.g. mpiBLAST to search it. Super-linear speedups can also occur when performing backtracking in parallel: an exception in one thread can cause several other threads to backtrack early, before they reach the exception themselves. Super-linear speedups can also occur in parallel implementations of branch-and-bound for optimization: the processing of one node by one processor may affect the work other processors need to do for the other nodes.

See also Amdahl's law Gustafson's law Brooks's law Karp–Flatt metric Parallel slowdown Scalability

References

Worked examples

Example 1 — a first encounter with Speedup

Start with the simplest possible case. Write down what Speedup claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Speedup before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Speedup ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Speedup

In research
Speedup appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Speedup in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Speedup is common in secondary-school and first-year university syllabi. It links to neighbouring topics Analysis of parallel algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Speedup outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Speedup” →

How to study Speedup in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Speedup means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Speedup out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Speedup in simple terms?

In computer architecture, speedup is a number that measures the relative performance of two systems processing the same problem. More technically, it is the improvement in speed of execution of a task executed on two similar architectures with different resources.

Why does Speedup matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Speedup?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Speedup.

Tags

  • Analysis of parallel algorithms

Keep exploring