Skip to content
Tactiverge

School/□ Systems Engineer/Week 34

A speed-up is a ratio: give it an interval

1.29× faster. Plus or minus what? And is 1.0 inside the interval?

About 35 min · 3 goals · Checked by automated tests

1.Why should I care?

Speed-ups, efficiency gains and energy savings are ratios of two measured quantities. Last fortnight's propagation rules turn into a tool you will use in every results table of your term project.

  • ◇ Compute a speed-up and its standard uncertainty by quotient propagation.
  • ◇ Build and interpret a 95% interval on a speed-up and use it to make a decision.
  • ◇ Report a benchmark result completely: value, interval, n, method and conditions.

2.Predict

A: 40.0 ± 0.4 ms, B: 31.0 ± 0.6 ms (standard errors). Which is the speed-up's standard uncertainty?

Guess first. Being wrong here is how the surprise works.

3.Discover

Choose A ÷ B. Set A = 40 with δA = 0.4 (1%) and B = 16 with δB = 0.3 (about 1.9%): the same relative uncertainties as the benchmark below, so the ratio's relative uncertainty is the same too. Read it off, then increase δB and watch it grow. Finally open the benchmark checker and compare its interval with your hand calculation.

Loading the interactive…

Can't use the interactive? Read a description instead

The uncertainty calculator in quotient mode shows A ÷ B with its propagated uncertainty and a Monte Carlo histogram. For A = 40 ± 0.4 and B = 16 ± 0.3 the ratio is 2.5 with a relative uncertainty of about 2.2%, the same relative uncertainty as a 40 ± 0.4 ms against 31 ± 0.6 ms benchmark, and the simulation agrees with the formula. Raising δB widens the histogram and eventually skews it, which is when the symmetric formula becomes unreliable.

4.Checkpoint: guided practice

Check what you just discovered before going on. Hints appear after a wrong answer.

Practice 1 · a fresh version every time

Baseline mean = 40 ± 0.8 ms and optimised mean = 33.3 ± 1.33 ms (each ± is a standard error, independent). The speed-up S = baseline ÷ optimised. What is the standard uncertainty of S? (3 decimal places.)

×

5.Understand

From two means to one ratio

Speed-up S = t_A/t_B. With independent standard errors SE_A and SE_B: δS/S = √((SE_A/t_A)² + (SE_B/t_B)²). A 95% interval is S ± 1.96·δS. If the interval lies wholly above 1, B is faster at that confidence; if it includes 1, the data don't show a speed-up.

Compare against what matters

Statistical clarity is not the same as practical value. An interval of 1.02–1.04 is confidently above 1 but may not justify a risky change. Compare the interval with the threshold you set in your decision rule (say 1.10), not just with 1.

Ratios of noisy numbers misbehave

The quotient rule is first order. If B's relative uncertainty exceeds about 10%, the distribution of t_A/t_B is skewed and the symmetric interval misleads; use more repeats, or resample (bootstrap) the runs. Also beware averaging per-run speed-ups: the mean of ratios is not the ratio of means.

Report completely

A good line in a results table: 'Speed-up (median time, B vs A) 1.29 [1.24, 1.35], 95% CI by quotient propagation; n = 30 runs each after 3 warm-up, interleaved; same 4 MB input; laptop on mains, fixed performance mode.' Anyone can judge it, and anyone can try to reproduce it.

Explain it another way

Two wobbly measurements make a wobblier ratio. The percentages of wobble combine, like the sides of a right-angled triangle.

Worked example 1

A = 60.0 ± 1.2 ms, B = 50.0 ± 1.5 ms. Speed-up, uncertainty and 95% interval. Does it clear a 1.10 threshold?

S = 1.200. Relative: 2.0% and 3.0%, combined 3.6%. δS = 0.043. 95%: 1.200 ± 0.085 → 1.115 to 1.285. It clears 1.10, narrowly.

Common mix-ups

  • If the speed-up is above 1, the new version is faster.
    ✓ Only if the interval excludes 1 (and, for a decision, clears your practical threshold).
  • Uncertainties of a ratio partly cancel.
    ✓ For independent measurements, relative uncertainties combine in quadrature; they never cancel.

6.Practice on your own

Practice, not a test. Wrong answers get a hint and another try.

Practice 2 · a fresh version every time

Baseline mean = 18 ± 0.18 ms and optimised mean = 6 ± 0.06 ms (each ± is a standard error, independent). The speed-up S = baseline ÷ optimised. What is the standard uncertainty of S? (3 decimal places.)

×

Practice 3

A speed-up is reported as 1.08 with 95% interval 0.97–1.19. What should the report conclude?

Practice 4

Why not compute the speed-up as the average of per-run ratios t_A,i / t_B,i?

7.Apply it

Take the benchmark checker's fair configuration, run five seeds, and record S ± δS for each. How many intervals contain the true 1.29? Write a results-table line in the format above for your best-documented run.

8.Reflect

Concepts: Benchmarking methodology · Propagation of uncertainty · Confidence intervals