Skip to content

Phase 11.11: bench-validate alignas fix from 11.10 - #64

Merged
jayakasadev merged 1 commit into
mainfrom
feature/phase-11-11-validate-alignas
Jun 12, 2026
Merged

jayakasadev merged 1 commit into
mainfrom
feature/phase-11-11-validate-alignas

Conversation

@jayakasadev

Copy link
Copy Markdown
Owner

Summary

  • 5-run sweep of cargo bench --features stats-basic after Phase 11.10 merged
  • mixed 1.027 → 1.018 (PASS)
  • small_allocs ~0.996 (PASS, unchanged)
  • medium_allocs 1.122 (FAIL — σ 4.7%, variance-dominated)
  • Disassembly diff: 0 inst delta in inline small_alloc/dealloc fast paths; +10–14 inst in _malloc/_calloc FFI shim thunks

ClickUp

  • 86aj11yuj

Test plan

  • cargo bench --features stats-basic --bench stats_bench (5 runs)
  • objdump -d libsnmallocshim.dylib BASIC vs OFF — diff inspected
  • No code change; doc-only PR

Outcome

False-sharing fix (Phase 11.10) confirmed correct for mixed. medium_allocs residual lives in the FFI shim layer (not stats counters per se) and is dominated by host variance. Authoritative resolution requires the Linux pinned bench (ticket 86aj0jg36, blocked on box access).

5-run sweep on Apple M4 Pro after merging Phase 11.10 alignas(64)
padding (commit f3ee3a1).

Results:
  small_allocs   0.996  PASS
  medium_allocs  1.122  FAIL (variance-dominated, sigma 4.7%)
  mixed          1.018  PASS (moved from 1.027 post-alignas)

Disassembly diff confirms zero instruction delta in the inline
Allocator<...>::small_alloc and ::dealloc fast paths. Remaining
cost lives in the _malloc / _calloc FFI shim thunks (+10 / +14
instructions). medium_allocs amplifies the shim cost because its
4 KiB allocs go through std::alloc::alloc on every iteration.

mixed passing the strict 1.02 spec is the new datapoint here.
medium_allocs variance exceeds the spec gap; Linux pinned bench
(ticket 86aj0jg36) is the authoritative next step.
@jayakasadev
jayakasadev merged commit 337bd4d into main Jun 12, 2026
16 of 211 checks passed
@jayakasadev
jayakasadev deleted the feature/phase-11-11-validate-alignas branch June 12, 2026 19:10
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