2 Commits
Author SHA1 Message Date
Joseph MattielloandClaude Opus 4.7 ee93fe5bde perf: make benchmark target + docs/profiling.md
The harness at test/tools/test_benchmark.c already existed but had no
build wiring -- it just sat there waiting.  Now \`make benchmark\` builds
the harness and runs it against a default ROM (test/roms/yarc.j64), with
overrides for ROM, frame count, warmup, and blitter mode:

  make benchmark                                  # 600 frames, fast blitter
  make benchmark BENCH_FRAMES=3000                # longer = smoother numbers
  make benchmark BENCH_BLITTER=accurate           # A/B against slow path
  make benchmark BENCH_ROM=test/roms/private/X.j64

Local sanity: ./test/tools/test_benchmark on yarc.j64 reports
~240 FPS / 4.2ms per frame on Apple Silicon, fast blitter.  Use as a
same-host commit-to-commit delta during the upcoming perf work.

docs/profiling.md is the new reference: macOS Instruments invocation,
Linux perf + flame graph, the SIMD A/B knob, known hot paths
(OPProcessFixedBitmap, BlitterMidsummer2, GPUExec, DSPExec), build
flavors for profiling vs sanitizing vs coverage, and a
regression-triage checklist.

CONTRIBUTING.md and CLAUDE.md cross-reference the new doc.

The harness binary is built inline in the benchmark recipe (not via a
separate rule under the TEST_EXPORTS=1 block), so \`make benchmark\`
works without TEST_EXPORTS=1 -- the harness only uses the production
retro_* exports.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-01 01:39:01 -04:00
Joseph MattielloandClaude Opus 4.7 50954e8fa9 docs: CONTRIBUTING.md + harden install-hooks.sh
CONTRIBUTING.md is the human-facing complement to CLAUDE.md.  Covers
GitFlow branching, build / test / lint commands, pre-commit setup,
commit-message style, and the C89 reminder.

scripts/install-hooks.sh now also runs check-info-version.sh in the
pre-commit pipeline whenever dist/info/.info or Makefile is staged --
catches a stale display_version bump before it reaches CI.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-01 01:18:51 -04:00