Skip to main content

Reproducible locality measurement lab

Download the lab archive, extract locality-evidence and read its README. Use C11 Clang/GCC, at least 32-bit size_t, and Python 3.10+ with the standard library. The extension replaces the old short exercise; experiments and evidence take 8–12 of its 18–26 hours.

Predict, check, measure​

  1. Derive row/column address sequences and state a falsifiable locality prediction.
  2. Run the supplied harness:
python3 run.py > measurements.json
cc -std=c11 -O2 -S kernels.c -o kernels.s
  1. Preserve raw samples and checksums, not just the fastest run. The harness uses dimensions 128, 511, 512 and 1024, three repetitions and eight alternating-order samples per dimension. Initialization is excluded; both paths are warmed. Every result must match an independent checksum.
  2. Inspect kernels.s and annotate actual loop/vector behavior on your target. Record CPU/cache details, OS, compiler, flags, load and power conditions; unknown details must remain unknown.
  3. Interpret medians and ranges. Zero-resolution samples need more work or a larger dimension within the documented bounds. The timer reports process CPU seconds, not wall time. Never compare instrumented timings to normal builds as a speed result.
  4. Add a fresh dimension or repetition count, retain an alternative explanation, and propose the next discriminating experiment. No particular winner or speedup is required. If no anomalous case occurs, say so honestly.

Submission​

Attach predictions, raw JSON, assembly notes, environment notes, correctness checks and a bounded conclusion. Include a source/help declaration and delayed changed-case defense. Pass PE1–PE6. A checksum failure blocks any performance conclusion. This lab does not replace the required specialized-platform strand.