PERFXPLORER / EXPERIMENTS 001–003

Small changes.
Measurable consequences.

Three C++ performance questions. Make a prediction, inspect the measurements, then take the code apart.

Recorded native C++ · 7 trials per variant · Shared Linux container

Loading the recorded trials…

AN ACCESS PATTERN YOU CAN FOLLOW

Same nodes. Different journey.

Step through a 64-node illustration. Each outlined group represents four 16-byte nodes on an assumed 64-byte cache line.

Illustration only. The count tracks changes from the immediately previous line, not hardware cache misses. Real caches retain many lines. This grid does not execute or time the native C++ kernel.

Visited Current node · numbers are memory positions

THE CONTEXT IS PART OF THE RESULT

Reproduce it. Question it.

These are controlled workloads from Perfxplorer, my C++ profiling project. The public page serves static evidence and an illustration. Run the native executable locally to measure your hardware.

What the harness checks

Every timed workload must produce its expected checksum. Variants alternate order across seven trials after two warmup pairs. The evidence collector rejects missing trials, duplicate samples, invalid durations, and incorrect allocation counts.

What remains uncontrolled

CPU frequency, power policy, thread placement, and other tenants. Setup is excluded and memory is warm. The charts establish neither portable speedups nor production improvements. No hardware cache counters or flamegraphs were captured.

Build and run the native experiments

Download these files into one directory: bench.cpp, CMakeLists.txt, collect.py, test_collect.py, and LICENSE. Requires a C++20 compiler, CMake 3.20+, threads, and Python 3.10+.

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j2
ctest --test-dir build --output-on-failure
python3 -m unittest discover -p test_collect.py
python3 collect.py --output my-results.json

Timings are observations, so correctness tests impose no speed threshold. See the methodology for workload details and limitations.