TactivergeLite

Lite / Independent Engineering Research / Week 26

Ablations: which part made it better?

Your new design is 40% faster. It has a bigger cache, a new predictor and a compiler flag. Which one did the work?

About 40 min · 3 goals · Checked by automated tests · Full interactive version

Why should I care?

Claims like 'our architecture is faster' are only useful if you know why. Ablations isolate each change, so the next engineer knows which idea to keep. They are expected in any serious systems or ML paper.

Predict

In the cache simulator, the 'Two arrays that collide' pattern runs direct-mapped. You change to 2-way AND 32-byte blocks at once, and misses drop. What can you conclude?

  1. Both changes helped equally
  2. Associativity did all the work
  3. You cannot tell which change helped without testing each separately
  4. Block size did all the work
Guess first, then reveal

Changing two things at once confounds them. Test each from the same baseline. Surprise: in this simulator the number of lines is fixed, so 32-byte blocks also double the cache's capacity, which moves b[i] to different lines. 'Block size' secretly changed two things. Good ablations check what else each knob moves.

Discover

Baseline: 'Two arrays that collide', direct-mapped, 16 B blocks. Record the misses. Now change only associativity, then only block size (back to direct-mapped), then both. Fill a 2×2 table of misses. Then read the note under the simulator: what else changes when the block size changes with 8 lines fixed?

What the interactive shows (text version)

With 'Two arrays that collide' (16 reads): direct-mapped with 16 B blocks gives 16 misses; 2-way gives 4; direct-mapped with 32 B blocks gives 2, because the 8-line cache doubles in size; 2-way with 32 B blocks also gives 2.

You can also open the interactive on the full site when you have a faster connection.

Understand

One change at a time

Start from the full system and remove (or start from the baseline and add) one component per run, holding everything else fixed: same inputs, same metric, same conditions. The difference from the reference attributes performance to that component.

Interactions

Components can interact: a bigger cache may make a prefetcher less useful, or a predictor may matter only with a deep pipeline. A full factorial design (every combination; 2ⁿ runs for n on/off components) reveals interactions; with many components, test the most plausible pairs.

Explain, don't just tabulate

Tie each effect to a mechanism. 'Two-way associativity removed the conflict misses because a[i] and b[i] share index bits' is a finding; '2-way is 4× better' is only a number. Mechanism-level explanations generalise to new workloads; raw numbers may not.

Explain it another way

Intuitive

A cake tastes better after you changed the flour, the oven and the recipe. Bake it again changing only one of them to find out which one mattered.

Technical

Ablation design: define the reference configuration, the component list, the metric with uncertainty, and the order of runs (randomised). Report each ablation's effect with an interval, plus any interaction terms measured.

Mathematical

In a 2×2 factorial with outcomes y₀₀, y₁₀, y₀₁, y₁₁: main effect of A = ½[(y₁₀ − y₀₀) + (y₁₁ − y₀₁)]; interaction = ½[(y₁₁ − y₀₁) − (y₁₀ − y₀₀)].

Applied

Processor design teams evaluate each proposed feature with simulation ablations on benchmark suites, using the Iron Law to check whether a gain came through CPI, clock or instruction count.

Worked example 1

Simulator misses for the colliding arrays: baseline (direct-mapped, 16 B) 16; 2-way only 4; 32 B blocks only 2; both 2. Main effects and interaction?

Associativity: ½[(4 − 16) + (2 − 2)] = −6. Block size: ½[(2 − 16) + (2 − 4)] = −8. Interaction: ½[(2 − 2) − (4 − 16)] = +6: once one fix removes the conflict, the other adds nothing. Mechanism: with 8 lines fixed, 32 B blocks double the cache to 256 B, so a[i] and b[i] no longer share an index. A cleaner ablation holds capacity fixed (halve the lines when doubling the block).

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

Practice 1. Which is an ablation?

ms

hits

cycles

Practice 5. Doubling the L1 cache cut run time by 20%. Which follow-up best explains it from first principles?

Apply it

Plan the ablations for your term project: which components (precision of weights, precision of the accumulator, rounding mode, sample rate) will you vary one at a time, from which reference, and what mechanism do you predict for each effect?

Reflect

Think of a claim you have read that bundled several changes together. What ablation would have made it convincing?

Write your answer on paper or in your own notes. Lite never stores what you write.

← Benchmarking computer systems fairlyDesigning an architecture comparison →