Skip to content

Follow-up C: Publish profile_bench results — README <1% claim partially supported - #29

Merged
jayakasadev merged 2 commits into
mainfrom
followup/c-bench-results
Jun 11, 2026
Merged

jayakasadev merged 2 commits into
mainfrom
followup/c-bench-results

Conversation

@jayakasadev

@jayakasadev jayakasadev commented Jun 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Publishes docs/heap-profiling-benchmarks.md with measured overhead from Phase 7.2's criterion bench suite.

Machine: Apple M4 Pro / macOS 26.3.1 / 12 cores / rustc 1.95.0
Wall clock: ~85s for full 3-group × 3-variant sweep

Headline

group ratio_idle ratio_active
small_allocs 0.9955 0.9907
medium_allocs 1.0493 1.0423
mixed 1.0276 1.0387
avg 1.0241 1.0239
max 1.0493 1.0423

Status

The README "<1% overhead at default sampling rate" claim is the design target. This measurement does not yet support it on medium_allocs and mixed. The gap is being driven to closure in ClickUp ticket 86aj0hfmc (open). Investigation targets: cache-line alignment of the Sampler hot state, Phase 3.3 alloc-hook fast path, dealloc null-check predictor behavior, lazy-provider first-touch costs.

Closes ClickUp ticket 86aj0h88j (the publish task). The perf gap is tracked separately.

Test plan

  • cargo bench --features profiling (all 3 groups completed, no skips)
  • docs/heap-profiling-benchmarks.md well-formed markdown

- Run snmalloc-rs/benches/profile_bench.rs end-to-end with --features
  profiling on Apple M4 Pro / macOS 26.3.1; capture mean / CI /
  median / stddev from target/criterion/*/new/estimates.json.
- New docs/heap-profiling-benchmarks.md table-formats the raw numbers
  for the small_allocs / medium_allocs / mixed groups across the three
  variants (profile-off, profile-on-inactive, profile-on-active).
- Compute ratio_idle and ratio_active per group; averages are ~1.024
  in both configurations, max ratio is 1.0493 on
  medium_allocs/profile-on-inactive. All groups stay inside the
  bench harness's documented <=1.05 acceptance band.
- Document the gap vs the existing "<1% overhead" README claim: small
  allocs support it (in noise), but medium and mixed land at ~3-5%.
  Recommend softening the README phrasing in a follow-up PR.
- No groups hit the 20-minute time budget; full sweep ~85s wall-clock.
- Replace 'soften README claim' recommendation with link to
  ClickUp ticket 86aj0hfmc that drives medium/mixed under 1%
- Keep reproduction caveats (Linux pinning, larger sample_size)
- Per user direction: target stays; gap is a perf-regression
  follow-up, not a docs change
@jayakasadev
jayakasadev merged commit 3ae1a9e into main Jun 11, 2026
117 of 127 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant