Phase 13 v1 + E5-2 retest: Both NEUTRAL, freeze as research boxes
Phase 13 v1: Header Write Elimination (C7 preserve header)
- Verdict: NEUTRAL (+0.78%)
- Implementation: HAKMEM_TINY_C7_PRESERVE_HEADER ENV gate (default OFF)
- Makes C7 nextptr offset conditional (0→1 when enabled)
- 4-point matrix A/B test results:
* Case A (baseline): 51.49M ops/s
* Case B (WRITE_ONCE=1): 52.07M ops/s (+1.13%)
* Case C (C7_PRESERVE=1): 51.36M ops/s (-0.26%)
* Case D (both): 51.89M ops/s (+0.78% NEUTRAL)
- Action: Freeze as research box (default OFF, manual opt-in)
Phase 5 E5-2: Header Write-Once retest (promotion test)
- Verdict: NEUTRAL (+0.54%)
- Motivation: Phase 13 Case B showed +1.13%, re-tested with dedicated 20-run
- Results (20-run):
* Case A (baseline): 51.10M ops/s
* Case B (WRITE_ONCE=1): 51.37M ops/s (+0.54%)
- Previous test: +0.45% (consistent with NEUTRAL)
- Action: Keep as research box (default OFF, manual opt-in)
Key findings:
- Header write tax optimization shows consistent NEUTRAL results
- Neither Phase 13 v1 nor E5-2 reaches GO threshold (+1.0%)
- Both implemented as reversible ENV gates for future research
Files changed:
- New: core/box/tiny_c7_preserve_header_env_box.{c,h}
- Modified: core/box/tiny_layout_box.h (C7 offset conditional)
- Modified: core/tiny_nextptr.h, core/box/tiny_header_box.h (comments)
- Modified: core/bench_profile.h (refresh sync)
- Modified: Makefile (add new .o files)
- Modified: scripts/run_mixed_10_cleanenv.sh (add C7_PRESERVE ENV)
- Docs: PHASE13_*, PHASE5_E5_2_HEADER_WRITE_ONCE_* (design/results)
Next: Phase 14 (Pointer-chase reduction, tcache-style intrusive LIFO)
🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -162,22 +162,74 @@ Phase 6-10 で達成した累積改善:
|
||||
|
||||
詳細: `docs/analysis/PHASE12_STRATEGIC_PAUSE_RESULTS.md`
|
||||
|
||||
### Next: Phase 13(Header Write Elimination)
|
||||
### Phase 13: Header Write Elimination v1 — NEUTRAL (+0.78%) ⚠️ RESEARCH BOX
|
||||
|
||||
**方向性決定**: Pause 解除、Phase 13 へ進む ✅
|
||||
**Date**: 2025-12-14
|
||||
**Verdict**: **NEUTRAL (+0.78%)** — Frozen as research box (default OFF, manual opt-in)
|
||||
|
||||
**Target**: 1-byte header write の削除(最優先仮説)
|
||||
**Target**: steady-state の header write tax 削減(最優先仮説)
|
||||
|
||||
**Strategy**:
|
||||
- Header を user pointer より前に配置(system malloc パターン)
|
||||
- または header-less classification(RegionId のみ)
|
||||
**Strategy (v1)**:
|
||||
- **C7 freelist がヘッダを壊さない**形に寄せ、E5-2(write-once)を C7 にも適用可能にする
|
||||
- ENV: `HAKMEM_TINY_C7_PRESERVE_HEADER=0/1` (default: 0)
|
||||
|
||||
**Expected ROI**: **+10-20%**
|
||||
**Results (4-Point Matrix)**:
|
||||
| Case | C7_PRESERVE | WRITE_ONCE | Mean (ops/s) | Delta | Verdict |
|
||||
|------|-------------|------------|--------------|-------|---------|
|
||||
| A (baseline) | 0 | 0 | 51,490,500 | — | — |
|
||||
| **B (E5-2 only)** | 0 | 1 | **52,070,600** | **+1.13%** | candidate |
|
||||
| C (C7 preserve) | 1 | 0 | 51,355,200 | -0.26% | NEUTRAL |
|
||||
| D (Phase 13 v1) | 1 | 1 | 51,891,902 | +0.78% | NEUTRAL |
|
||||
|
||||
**Next Actions**:
|
||||
1. Header write overhead の実測(perf annotate)
|
||||
2. Header-less classification の feasibility 検証
|
||||
3. Phase 13 設計書の作成
|
||||
**Key Findings**:
|
||||
1. **E5-2 (HAKMEM_TINY_HEADER_WRITE_ONCE=1) は “単発 +1.13%” を観測したが、20-run 再テストで NEUTRAL (+0.54%)**
|
||||
- 参照: `docs/analysis/PHASE5_E5_2_HEADER_WRITE_ONCE_RETEST_AB_TEST_RESULTS.md`
|
||||
- 結論: E5-2 は research box 維持(default OFF)
|
||||
|
||||
2. **C7 preserve header alone: -0.26%** (slight regression)
|
||||
- C7 offset=1 memcpy overhead outweighs benefits
|
||||
|
||||
3. **Combined (Phase 13 v1): +0.78%** (positive but below GO)
|
||||
- C7 preserve reduces E5-2 gains
|
||||
|
||||
**Action**:
|
||||
- ✅ Freeze Phase 13 v1 as research box (default OFF)
|
||||
- ✅ Re-test Phase 5 E5-2 (WRITE_ONCE=1) with dedicated 20-run → NEUTRAL (+0.54%)
|
||||
- 📋 Document results: `docs/analysis/PHASE13_HEADER_WRITE_ELIMINATION_1_AB_TEST_RESULTS.md`
|
||||
|
||||
### Phase 5 E5-2: Header Write-Once — 再テスト NEUTRAL (+0.54%) ⚪
|
||||
|
||||
**Date**: 2025-12-14
|
||||
**Verdict**: ⚪ **NEUTRAL (+0.54%)** — Research box 維持(default OFF)
|
||||
|
||||
**Motivation**: Phase 13 の 4点マトリクスで E5-2 単体が +1.13% を記録したため、専用 20-run で昇格可否を判定。
|
||||
|
||||
**Results (20-run)**:
|
||||
| Case | WRITE_ONCE | Mean (ops/s) | Median (ops/s) | Delta |
|
||||
|------|------------|--------------|----------------|-------|
|
||||
| A (baseline) | 0 | 51,096,839 | 51,127,725 | — |
|
||||
| B (optimized) | 1 | 51,371,358 | 51,495,811 | **+0.54%** |
|
||||
|
||||
**Verdict**: NEUTRAL (+0.54%) — GO 閾値 (+1.0%) 未達
|
||||
|
||||
**考察**:
|
||||
- Phase 13 の +1.13% は 10-run での観測値
|
||||
- 専用 20-run では +0.54%(より信頼性が高い)
|
||||
- 旧 E5-2 テスト (+0.45%) と一貫性あり
|
||||
|
||||
**Action**:
|
||||
- ✅ Research box 維持(default OFF、manual opt-in)
|
||||
- ENV: `HAKMEM_TINY_HEADER_WRITE_ONCE=0/1` (default: 0)
|
||||
- 📋 詳細: `docs/analysis/PHASE5_E5_2_HEADER_WRITE_ONCE_RETEST_AB_TEST_RESULTS.md`
|
||||
|
||||
**Next**: Phase 12 Strategic Pause の次の gap 仮説へ進む
|
||||
|
||||
### Next: Phase 14(Pointer Chase Reduction / Tiny tcache)
|
||||
|
||||
**狙い**: system malloc の tcache に寄せて、Tiny frontend の “配列/FIFO/indirection” コストを減らす。
|
||||
|
||||
- 設計: `docs/analysis/PHASE14_POINTER_CHASE_REDUCTION_1_DESIGN.md`
|
||||
- 指示: `docs/analysis/PHASE14_POINTER_CHASE_REDUCTION_1_NEXT_INSTRUCTIONS.md`
|
||||
|
||||
## 更新メモ(2025-12-14 Phase 5 E5-3 Analysis - Strategic Pivot)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user