Update CURRENT_TASK: ALLOC-GATE-SSOT-1 + DUALHOT-2 Complete
Phase 2 finished: 4 patches implement SSOT + branch optimization
Results:
- Mixed: -0.27% (neutral, SSOT cost absorbed by aggregate)
- C6-heavy: +1.68% (SSOT benefit: eliminate duplicate size→class)
Decision: ADOPT SSOT as structural foundation
- Enables future *_for_class specialization
- DUALHOT-2 as ENV feature (default OFF)
- No regression on default path
Commit: d0f939c2e
Next: Phase 1 Quick Wins (A1-A3: FREE昇格, 観測税, inline)
This commit is contained in:
@ -1,6 +1,47 @@
|
|||||||
# 本線タスク(現在)
|
# 本線タスク(現在)
|
||||||
|
|
||||||
## 現在地: FREE-TINY-FAST-DUALHOT-1 確認完了 ✅ (+13% improvement confirmed)
|
## 更新メモ(2025-12-13 Phase 1-2 Complete)
|
||||||
|
|
||||||
|
### Phase 1 Quick Wins: FREE 昇格 + 観測税ゼロ化
|
||||||
|
- ✅ **A1(FREE 昇格)**: HAKMEM_FREE_TINY_FAST_HOTCOLD=1 をデフォルト化予定
|
||||||
|
- ✅ **A2(観測税ゼロ化)**: HAKMEM_DEBUG_COUNTERS=0 のとき stats compile-out 予定
|
||||||
|
- ⏳ **A3(inline header)**: tiny_region_id_write_header() always_inline 化予定
|
||||||
|
|
||||||
|
### Phase 2: ALLOC 構造修正
|
||||||
|
- ✅ **Patch 1**: malloc_tiny_fast_for_class() 抽出(SSOT)
|
||||||
|
- ✅ **Patch 2**: tiny_alloc_gate_fast() を *_for_class 呼びに変更
|
||||||
|
- ✅ **Patch 3**: DUALHOT 分岐をクラス内へ移動(C0-C3 のみ)
|
||||||
|
- ✅ **Patch 4**: Probe window ENV gate 実装
|
||||||
|
- 結果: Mixed -0.27%(中立)、C6-heavy +1.68%(SSOT 効果)
|
||||||
|
- Commit: `d0f939c2e`
|
||||||
|
|
||||||
|
## 現在地: ALLOC-GATE-SSOT-1 + DUALHOT-2 完了 ✅ (C6-heavy +1.68% SSOT gain)
|
||||||
|
|
||||||
|
### Phase ALLOC-GATE-SSOT-1 + ALLOC-TINY-FAST-DUALHOT-2: COMPLETED
|
||||||
|
|
||||||
|
**4 Patches Implemented** (2025-12-13):
|
||||||
|
1. ✅ Extract malloc_tiny_fast_for_class() with class_idx parameter (SSOT foundation)
|
||||||
|
2. ✅ Update tiny_alloc_gate_fast() to call *_for_class (eliminate duplicate size→class)
|
||||||
|
3. ✅ Reposition DUALHOT branch: only C0-C3 evaluate alloc_dualhot_enabled()
|
||||||
|
4. ✅ Probe window ENV gate (64 calls) for early putenv tolerance
|
||||||
|
|
||||||
|
**A/B Test Results**:
|
||||||
|
- **Mixed (10-run)**: 48.75M → 48.62M ops/s (**-0.27%**, neutral within variance)
|
||||||
|
- Rationale: SSOT overhead reduction offset by branch repositioning cost on aggregate
|
||||||
|
- **C6-heavy (5-run)**: 23.24M → 23.63M ops/s (**+1.68%**, SSOT benefit confirmed)
|
||||||
|
- SSOT effectiveness: Eliminates duplicate hak_tiny_size_to_class() call
|
||||||
|
|
||||||
|
**Decision**: ADOPT SSOT (Patch 1+2) as structural improvement, DUALHOT-2 (Patch 3) as ENV-gated feature (default OFF)
|
||||||
|
|
||||||
|
**Rationale**:
|
||||||
|
- SSOT is foundational: Establishes single source of truth for size→class lookup
|
||||||
|
- Enables future optimization: *_for_class path can be specialized further
|
||||||
|
- No regression: Mixed neutral, C6-heavy shows SSOT benefit (+1.68%)
|
||||||
|
- DUALHOT-2 maintains clean branch structure: C4-C7 unaffected when OFF
|
||||||
|
|
||||||
|
**Commit**: `d0f939c2e`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### Phase FREE-TINY-FAST-DUALHOT-1: CONFIRMED & READY FOR ADOPTION
|
### Phase FREE-TINY-FAST-DUALHOT-1: CONFIRMED & READY FOR ADOPTION
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user