Create and run benchmarks

Create and run benchmarks in C++ — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
I need to measure whether the latest refactor improved performance for the collision system. Build…
I need to measure whether the latest refactor improved performance for the collision system. Build a small harness that runs the new and old implementations back-to-back on the same inputs and reports mean, median and 95th percentile times in milliseconds over 10,000 iterations. Use the existing test scene from Tests/Scenes/arena.csv, pin the thread to one core, and seed the RNG with 42. Produce a CSV with columns: implementation,iteration,ms. Ladder L1

Improve — make it easier to accept

+
Before I hand this benchmark to QA, make the results easy to interpret: put the percent difference…
Before I hand this benchmark to QA, make the results easy to interpret: put the percent difference from baseline and a clear statement about statistical significance up top, highlight any input sizes where the new code is slower, and add a short note on whether the harness pins threads and warms caches. Keep the harness runnable as a single .cpp with command-line flags for iterations and input file. Ladder L2

Decide — diagnose the stuck moment

+
I ran the benchmark against the arena scene with 10,000 iterations and the new refactor shows a 7%…

I just ran the harness and the new code is 7% faster on average but has a much fatter tail

I ran the benchmark against the arena scene with 10,000 iterations and the new refactor shows a 7% improvement in mean time but the 95th percentile is 55% worse. I fear the change introduces occasional expensive branches under specific object layouts. I cannot easily inspect runtime object geometry in the harness. What is the likely cause and the best next experiment to narrow it down? Ladder L5

Become — change the pattern

+
Across multiple refactors I keep shipping faster averages but with unpredictable worst-case spikes…

Benchmarks show inconsistent tails across runs

Across multiple refactors I keep shipping faster averages but with unpredictable worst-case spikes that users complain about. Where am I going wrong in how I design microbenchmarks and CI signals, and what habit should I change to avoid these tail regressions becoming production incidents? Suggest one concrete change to the harness, one CI policy change, and one simple developer habit. Ladder L6

Next to this one

Other programming language work people do in C++.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.