ferris-perf

Installation
SKILL.md

Performance Measurement

Measure the right build

  • Profile optimized builds with symbols. Cargo: a [profile.profiling] that inherits = "release" with debug = true (or "line-tables-only"). MSVC: /Zi and /DEBUG, but /DEBUG switches the linker to /OPT:NOREF, /OPT:NOICF, and incremental linking; restore /OPT:REF /OPT:ICF /INCREMENTAL:NO so the measured binary matches the shipped one.
  • Keep hardening (/guard:cf, /CETCOMPAT, overflow checks the project enables) on while measuring; removing it is not an optimization.
  • -C target-cpu=native and /arch: levels above the deployment baseline produce binaries that fault on older CPUs. Use them only for binaries that never leave the build machine.

Get a trustworthy number

  • Fix the workload and the metric (p50/p99 latency, throughput, peak private bytes, build time) before changing code.
  • Interleave runs (A B A B) and report median and spread over repeated runs on the same machine. Discard or report the cold first run separately.
  • Defender real-time scanning, indexing, power plan, and thermal limits dominate I/O and build timings on Windows. Note them; changing exclusions, power plans, or Dev Drive setup is a machine-wide change that needs approval.
  • In microbenchmarks, keep inputs and results opaque to the optimizer (std::hint::black_box, benchmark::DoNotOptimize). Confirm a microbenchmark win at the user-visible metric.

Find the cost

Installs
2
First Seen
Oct 19, 2026