# Phase 75-2: C5 Inline Slots Implementation & A/B Test
**Status**: IMPLEMENTATION COMPLETE - READY FOR A/B TEST
**Date**: 2025-12-18
**Phase**: 75-2 (C5-only inline slots, separate from C6)
---
## Executive Summary
Phase 75-2 extends the hot-class inline slots optimization to **C5 class only** (separate from C6), following the exact pattern from Phase 75-1 but applied to C5.
### Quick Test Results (Initial Run)
**Baseline**: C5=OFF, C6=ON → 44.62 M ops/s
**Treatment**: C5=ON, C6=ON → 45.51 M ops/s
**Delta**: +0.89 M ops/s (+1.99%)
**DECISION**: GO (+1.99% > +1.0% threshold)
**RECOMMENDATION**: Proceed to Phase 75-3 (C5+C6 interaction test)
---
## 1. STRATEGY
### Approach: C5-only Single A/B Test FIRST
- **Measure C5 individual contribution in isolation**
- **Separate C5 impact from C6** (which is already ON from Phase 75-1)
- **If GO**: Phase 75-3 will test C5+C6 interaction effects
- **Goal**: Validate that C5 adds independent benefit before combining
### Why Separate Testing?
1.**C6-only proved +2.87%** (Phase 75-1)
2.**C5-only will show C5's individual ROI**
3.**C5+C6 together may have sub-additive effects** (cache pressure, TLS bloat)
4.**Data-driven decision**: Combine only if both components show healthy ROI independently
**Phase 75-2** tests C5-only BUT with C6 already enabled:
- **Baseline**: C5=OFF, C6=ON (from Phase 75-1, now the new baseline)
- **Treatment**: C5=ON, C6=ON (adds C5 on top)
**This isolates C5's individual contribution.**
### Test Configuration
```bash
# Baseline: C6=ON, C5=OFF
HAKMEM_WARM_POOL_SIZE=16 \
HAKMEM_TINY_C6_INLINE_SLOTS=1 \
HAKMEM_TINY_C5_INLINE_SLOTS=0 \
./bench_random_mixed_hakmem 20000000 400 1
# Treatment: C6=ON, C5=ON
HAKMEM_WARM_POOL_SIZE=16 \
HAKMEM_TINY_C6_INLINE_SLOTS=1 \
HAKMEM_TINY_C5_INLINE_SLOTS=1 \
./bench_random_mixed_hakmem 20000000 400 1
```
---
## 4. INITIAL TEST RESULTS
### Throughput Analysis
```
Baseline (C5=OFF, C6=ON): 44.62 M ops/s
Treatment (C5=ON, C6=ON): 45.51 M ops/s
Delta: +0.89 M ops/s (+1.99%)
```
**Result**: GO (+1.99% > +1.0% threshold)
### Perf Stat Analysis (Treatment)
```
Instructions: 4 (avg, in scientific notation likely)
Branches: 14 (avg, in scientific notation likely)
Cache-misses: 478 (avg)
dTLB-load-misses: 29 (avg)
```
**Note**: The perf stat numbers in the quick test appear to be formatted incorrectly (missing magnitude). This needs to be verified in the full 10-run test.
---
## 5. SUCCESS CRITERIA
### A/B Test Gate (Strict)
- **GO**: +1.0% or higher ✅ **MET (+1.99%)**
- **NEUTRAL**: -1.0% to +1.0%
- **NO-GO**: -1.0% or lower
### Perf Stat Validation (CRITICAL)
Expected behavior (Phase 73 winning thesis):
- **Instructions**: Should decrease (or be flat)
- **Branches**: Should decrease (or be flat)
- **Cache-misses**: Should NOT spike like Phase 74-2
- **dTLB**: Should be acceptable
**Status**: REQUIRES FULL TEST with correct perf stat extraction
---
## 6. NEXT STEPS
### If GO (as indicated by initial test)
1. ✅ **Run full 10-iteration A/B test** to confirm +1.99% is stable
2. ✅ **Verify perf stat shows branch reduction** (or at least no increase)
3. ✅ **Check cache-misses and dTLB are healthy**
4. → **Proceed to Phase 75-3**: C5+C6 interaction test
- Test C5+C6 together (simultaneous ON)
- Check for sub-additive effects
- If additive, promote to `core/bench_profile.h` (preset default)
- Do not extrapolate Phase 75 from the FAST PGO baseline (Phase 69/68 scorecard numbers). Phase 75 must be measured on the **same binary** you care about.
- To measure Phase 75 on FAST PGO, run the same A/B with `BENCH_BIN=./bench_random_mixed_hakmem_minimal_pgo`.
**Phase 75-2 implementation is COMPLETE and READY for full A/B testing.**
Initial test results show **+1.99% improvement**, exceeding the +1.0% GO threshold. However, the baseline performance (44.62 M ops/s) is lower than expected, and perf stat extraction needs verification.
**Recommended next action**: Run full 10-iteration A/B test with verified ENV configuration to confirm stable performance gain before proceeding to Phase 75-3.