Phase 4 D3 Design: Alloc Gate Shape
This commit is contained in:
@ -303,18 +303,20 @@ static inline void* tiny_alloc_gate_fast(size_t size)
|
||||
---
|
||||
|
||||
### Phase 3 D3: Alloc Gate Specialization (MEDIUM PRIORITY)
|
||||
**Target**: `tiny_alloc_gate_fast()` for LEGACY-only route
|
||||
**Target**: `tiny_alloc_gate_fast()` の分岐形を最短化(MIXED 向け)
|
||||
**Expected Gain**: +1-2%
|
||||
**Risk**: LOW
|
||||
**Effort**: 2-3 hours
|
||||
|
||||
**Implementation**:
|
||||
1. Create `tiny_alloc_gate_fast_legacy()` specialized variant
|
||||
2. Eliminate ROUTE_POOL_ONLY and ROUTE_TINY_FIRST branches
|
||||
3. Use in MIXED profile where all classes are LEGACY
|
||||
1. New ENV gate: `HAKMEM_ALLOC_GATE_SHAPE=0/1`
|
||||
2. `tiny_route_get()` を避け、`g_tiny_route[]` の直接参照に置換(release logging branch を回避)
|
||||
3. `ROUTE_POOL_ONLY` は必ず尊重(`HAKMEM_TINY_PROFILE=hot/off` を壊さない)
|
||||
4. A/B test: BASELINE vs D3
|
||||
|
||||
**ENV Gate**: `HAKMEM_ALLOC_GATE_LEGACY_ONLY=1` (default: 0)
|
||||
**Design**: `docs/analysis/PHASE4_D3_ALLOC_GATE_SPECIALIZATION_1_DESIGN.md`
|
||||
|
||||
**ENV Gate**: `HAKMEM_ALLOC_GATE_SHAPE=0/1` (default: 0)
|
||||
|
||||
---
|
||||
|
||||
@ -376,7 +378,7 @@ static inline void* tiny_alloc_gate_fast(size_t size)
|
||||
|
||||
2. **Optional**: Phase 3 D3 (Alloc gate specialization) - pending perf validation
|
||||
- Only proceed if perf shows ≥5% self% in alloc gate
|
||||
- ENV: `HAKMEM_ALLOC_GATE_LEGACY_ONLY=0/1`
|
||||
- ENV: `HAKMEM_ALLOC_GATE_SHAPE=0/1`
|
||||
|
||||
3. **Phase 4 Planning**: If no more 5%+ targets, prepare Phase 4 roadmap
|
||||
|
||||
|
||||
Reference in New Issue
Block a user