Lite / Engineering Complex Systems / 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?
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.
Predict
A: 40.0 ± 0.4 ms, B: 31.0 ± 0.6 ms (standard errors). Which is the speed-up's standard uncertainty?
- About 0.01
- About 0.03
- About 0.10
- About 1.0
Guess first, then reveal
S = 40/31 = 1.290. Relative uncertainties: 1.0% and 1.94%; combined √(1.0² + 1.94²) ≈ 2.18%. δS ≈ 1.290 × 0.0218 ≈ 0.028.
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.
What the interactive shows (text version)
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.
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
Intuitive
Two wobbly measurements make a wobblier ratio. The percentages of wobble combine, like the sides of a right-angled triangle.
Technical
Delta-method variance of a ratio: Var(A/B) ≈ (μ_A/μ_B)²·(Var A/μ_A² + Var B/μ_B² − 2Cov(A, B)/(μ_Aμ_B)). Paired, interleaved runs can make A and B positively correlated, which reduces the variance of their ratio.
Mathematical
Log transform: ln S = ln t_A − ln t_B, and δ(ln t) ≈ δt/t. So δ(ln S) = √((δt_A/t_A)² + (δt_B/t_B)²), and an interval on ln S exponentiates to an asymmetric interval on S, which behaves better for large uncertainties.
Applied
Compiler teams track performance across thousands of benchmarks every night and flag a change only when the measured slowdown exceeds the run-to-run noise they've characterised for that benchmark.
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.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
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.
Reflect
When would you report a speed-up interval on a log scale rather than a linear one?
Write your answer on paper or in your own notes. Lite never stores what you write.