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>
49 lines
1.8 KiB
Markdown
49 lines
1.8 KiB
Markdown
# Bench Reproducibility SSOT(ころころ防止の最低限)
|
||
|
||
目的: 「数%を詰める開発」で一番きつい **ベンチが再現しない問題**を潰す。
|
||
|
||
## 1) まず結論(よくある原因)
|
||
|
||
同じマシンでも、以下が変わると 5–15% は普通に動く。
|
||
|
||
- **CPU power/thermal**(governor / EPP / turbo)
|
||
- **HAKMEM_PROFILE 未指定**(route が変わる)
|
||
- **export 漏れ**(過去の ENV が残る)
|
||
- **別バイナリ比較**(layout tax: text 配置が変わる)
|
||
|
||
## 2) SSOT(最適化判断の正)
|
||
|
||
- Runner: `scripts/run_mixed_10_cleanenv.sh`
|
||
- 必須:
|
||
- `HAKMEM_PROFILE=MIXED_TINYV3_C7_SAFE` を明示
|
||
- `RUNS=10`(ノイズを平均化)
|
||
- `WS=400`(SSOT)
|
||
- 任意(切り分け用):
|
||
- `HAKMEM_BENCH_ENV_LOG=1`(CPU governor/EPP/freq をログ)
|
||
|
||
## 3) reference(allocator間比較の正)
|
||
|
||
allocator比較は layout tax が混ざるため **reference**。
|
||
ただし “公平さ” を上げるなら同一バイナリで測る:
|
||
|
||
- Same-binary runner: `scripts/run_allocator_preload_matrix.sh`
|
||
- `bench_random_mixed_system` を固定して `LD_PRELOAD` を差し替える
|
||
|
||
## 4) “ころころ”を止める運用(最低限の儀式)
|
||
|
||
1. SSOT実行は必ず cleanenv:
|
||
- `scripts/run_mixed_10_cleanenv.sh`
|
||
2. 毎回、環境ログを残す:
|
||
- `HAKMEM_BENCH_ENV_LOG=1`
|
||
3. 結果をファイル化(後から追える形):
|
||
- `scripts/bench_ssot_capture.sh` を使う(git sha / env / bench出力をまとめて保存)
|
||
|
||
## 5) 重要メモ(AMD pstate epp)
|
||
|
||
`amd-pstate-epp` 環境で
|
||
- governor=`powersave`
|
||
- energy_perf_preference=`power`
|
||
のままだと、ベンチが“遅い側”に寄ることがある。
|
||
|
||
まずは `HAKMEM_BENCH_ENV_LOG=1` の出力が **同じ**条件同士で比較すること。
|