Key changes: - Phase 83-1: Switch dispatch fixed mode (tiny_inline_slots_switch_dispatch_fixed_box) - NO-GO (marginal +0.32%, branch reduction negligible) Reason: lazy-init pattern already optimal, Phase 78-1 pattern shows diminishing returns - Allocator comparison baseline update (10-run SSOT, WS=400, ITERS=20M): tcmalloc: 115.26M (92.33% of mimalloc) jemalloc: 97.39M (77.96% of mimalloc) system: 85.20M (68.24% of mimalloc) mimalloc: 124.82M (baseline) - hakmem PROFILE correction: scripts/run_mixed_10_cleanenv.sh + run_allocator_quick_matrix.sh PROFILE explicitly set to MIXED_TINYV3_C7_SAFE for hakmem measurements Result: baseline stabilized to 55.53M (44.46% of mimalloc) Previous unstable measurement (35.57M) was due to profile leak - Documentation: * PERFORMANCE_TARGETS_SCORECARD.md: Reference allocators + M1/M2 milestone status * PHASE83_1_SWITCH_DISPATCH_FIXED_RESULTS.md: Phase 83-1 analysis (NO-GO) * ALLOCATOR_COMPARISON_QUICK_RUNBOOK.md: Quick comparison procedure * ALLOCATOR_COMPARISON_SSOT.md: Detailed SSOT methodology - M2 milestone status: 44.46% (target 55%, gap -10.54pp) - structural improvements needed 🤖 Generated with Claude Code Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1.8 KiB
1.8 KiB
Phase 78-1: Inline Slots Fixed Mode (C3/C4/C5/C6) — Results
Goal
Remove per-operation ENV gate overhead for C3/C4/C5/C6 inline slots by caching the enable decisions at a single boundary (bench_profile refresh), while keeping Box Theory properties:
- Single boundary
- Reversible via ENV
- Fail-fast (no mid-run toggling assumptions)
- Minimal observability (perf + throughput)
Change Summary
-
New box:
core/box/tiny_inline_slots_fixed_mode_box.{h,c}- ENV:
HAKMEM_TINY_INLINE_SLOTS_FIXED=0/1(default0) - When enabled, caches:
HAKMEM_TINY_C3_INLINE_SLOTSHAKMEM_TINY_C4_INLINE_SLOTSHAKMEM_TINY_C5_INLINE_SLOTSHAKMEM_TINY_C6_INLINE_SLOTS
- Hot path uses
tiny_c{3,4,5,6}_inline_slots_enabled_fast().
- ENV:
-
Integration boundary:
core/bench_profile.h: callstiny_inline_slots_fixed_mode_refresh_from_env()after presetputenvdefaults.
-
Hot path call sites migrated:
core/box/tiny_front_hot_box.hcore/box/tiny_legacy_fallback_box.hcore/front/tiny_c{3,4,5,6}_inline_slots.h
A/B Method
- Same binary A/B (layout-safe):
scripts/run_mixed_10_cleanenv.sh - Workload: Mixed SSOT,
ITERS=20000000,WS=400,RUNS=10 - Toggle:
- Baseline:
HAKMEM_TINY_INLINE_SLOTS_FIXED=0 - Treatment:
HAKMEM_TINY_INLINE_SLOTS_FIXED=1
- Baseline:
Results (10-run)
Computed via AWK summary:
- Baseline (FIXED=0): mean
54.54M ops/s, CV0.51% - Treatment (FIXED=1): mean
55.80M ops/s, CV0.57% - Delta:
+2.31%✅
Decision: GO (exceeds +1.0% threshold).
Promotion
For Mixed preset/cleanenv SSOT alignment:
core/bench_profile.h:HAKMEM_TINY_INLINE_SLOTS_FIXED=1defaultscripts/run_mixed_10_cleanenv.sh:HAKMEM_TINY_INLINE_SLOTS_FIXED=1default
Rollback:
export HAKMEM_TINY_INLINE_SLOTS_FIXED=0