Moe Charm (CI)
f8e7cf05b4
Phase 16 v1 NEUTRAL, Phase 17 Case B confirmed, Phase 18 design added
## Phase 16 v1: Front FastLane Alloc LEGACY Direct — NEUTRAL (+0.62%)
Target: Reduce alloc-side fixed costs by adding LEGACY direct path to
FastLane entry, mirroring Phase 9/10 free-side winning pattern.
Result: +0.62% on Mixed (below +1.0% GO threshold) → NEUTRAL, freeze as
research box (default OFF).
Critical issue: Initial impl crashed (segfault) for C4-C7. Root cause:
unified_cache_refill() incompatibility. Safety fix: Limited to C0-C3
only (matching existing dualhot pattern).
Files:
- core/box/front_fastlane_alloc_legacy_direct_env_box.{h,c} (new)
- core/box/front_fastlane_box.h (LEGACY direct path, lines 93-119)
- core/bench_profile.h (env refresh sync)
- Makefile (new obj)
- docs/analysis/PHASE16_*.md (design/results/instructions)
ENV: HAKMEM_FRONT_FASTLANE_ALLOC_LEGACY_DIRECT=0 (default OFF, opt-in)
Verdict: Research box frozen. Phase 14-16 plateau confirms dispatch/
routing optimization ROI is exhausted post-Phase-6 FastLane collapse.
---
## Phase 17: FORCE_LIBC Gap Validation — Case B Confirmed
Purpose: Validate "system malloc faster" observation using same-binary
A/B testing to isolate allocator logic差 vs binary layout penalty.
Method:
- Same-binary toggle: HAKMEM_FORCE_LIBC_ALLOC=0/1 (bench_random_mixed_hakmem)
- System binary: bench_random_mixed_system (21K separate binary)
- Perf stat: Hardware counter analysis (I-cache, cycles, instructions)
Result: **Case B confirmed** — Allocator差 negligible, layout penalty dominates.
Gap breakdown (Mixed, 20M iters, ws=400):
- hakmem (FORCE_LIBC=0): 48.12M ops/s
- libc (FORCE_LIBC=1, same binary): 48.31M ops/s → +0.39% (noise level)
- system binary (21K): 83.85M ops/s → +73.57% vs libc, +74.26% vs hakmem
Perf stat (200M iters):
- I-cache misses: 153K (hakmem) → 68K (system) = -55% (smoking gun)
- Cycles: 17.9B → 10.2B = -43%
- Instructions: 41.3B → 21.5B = -48%
- Binary size: 653K → 21K (30x difference)
Root cause: Binary size (30x) causes I-cache thrashing. Code bloat >>
algorithmic efficiency.
Conclusion: Phase 12's "system malloc 1.6x faster" was real, but
misattributed. Gap is layout/I-cache, NOT allocator algorithm.
Files:
- docs/analysis/PHASE17_*.md (results/instructions)
- scripts/run_mixed_10_cleanenv.sh (Phase 9/10 defaults aligned)
Next: Phase 18 Hot Text Isolation (layout optimization, not algorithm opt)
---
## Phase 18: Hot Text Isolation — Design Added
Purpose: Reduce I-cache misses + instruction footprint via layout control
(binary optimization, not allocator algorithm changes).
Strategy (v1 → v2 progression):
v1 (TU split + hot/cold attrs + optional gc-sections):
- Target: +2% throughput (GO threshold, realistic for layout tweaks)
- Secondary: I-cache -10%, instructions -5% (direction confirmation)
- Risk: Low (reversible via build knob)
- Expected: +0-2% (NEUTRAL likely, but validates approach)
v2 (BENCH_MINIMAL compile-out):
- Target: +10-20% throughput (本命)
- Method: Conditional compilation removes stats/ENV/debug from hot path
- Expected: Instruction count -30-40% → significant I-cache improvement
Files:
- docs/analysis/PHASE18_*.md (design/instructions)
- CURRENT_TASK.md (Phase 17 complete, Phase 18 v1/v2 plan)
Build gate: HOT_TEXT_ISOLATION=0/1 (Makefile knob)
Next: Implement Phase 18 v1 (TU split first, BENCH_MINIMAL if v1 NEUTRAL)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 05:25:47 +09:00
..
2025-12-15 05:25:47 +09:00
2025-12-15 01:28:50 +09:00
2025-12-05 23:41:01 +09:00
2025-12-10 09:08:18 +09:00
2025-12-15 05:25:47 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-01 16:37:59 +09:00
2025-11-05 12:31:14 +09:00
2025-12-09 21:50:15 +09:00
2025-11-05 12:31:14 +09:00
2025-11-08 17:08:00 +09:00
2025-11-08 17:08:00 +09:00
2025-12-13 15:31:08 +09:00
2025-12-10 09:08:18 +09:00
2025-12-01 16:37:59 +09:00
2025-11-29 06:57:03 +09:00
2025-12-02 20:56:55 +09:00
2025-11-05 12:31:14 +09:00
2025-11-28 17:00:56 +09:00
2025-11-05 12:31:14 +09:00
2025-12-10 09:08:18 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-10 09:08:18 +09:00
2025-12-09 21:50:15 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-10 09:08:18 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-10 09:08:18 +09:00
2025-12-01 22:06:10 +09:00
2025-11-26 15:43:45 +09:00
2025-12-10 09:15:24 +09:00
2025-11-07 01:27:04 +09:00
2025-12-02 19:13:28 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-07 03:12:27 +09:00
2025-12-05 15:31:44 +09:00
2025-12-10 09:08:18 +09:00
2025-12-10 09:08:18 +09:00
2025-11-20 07:32:30 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-05 15:31:44 +09:00
2025-12-05 15:31:44 +09:00
2025-12-04 16:21:54 +09:00
2025-12-13 05:35:46 +09:00
2025-12-13 05:35:46 +09:00
2025-12-09 21:50:15 +09:00
2025-11-05 12:31:14 +09:00
2025-11-26 13:14:18 +09:00
2025-11-05 12:31:14 +09:00
2025-12-10 09:08:18 +09:00
2025-12-05 23:41:01 +09:00
2025-12-04 14:22:48 +09:00
2025-12-10 09:08:18 +09:00
2025-11-05 12:31:14 +09:00
2025-12-10 09:08:18 +09:00
2025-12-10 09:08:18 +09:00
2025-11-13 06:50:20 +09:00
2025-11-07 01:27:04 +09:00
2025-12-03 12:11:27 +09:00
2025-11-13 14:25:54 +09:00
2025-11-27 03:18:33 +09:00
2025-11-05 12:31:14 +09:00
2025-11-21 03:20:42 +09:00
2025-12-10 09:08:18 +09:00
2025-12-10 09:08:18 +09:00
2025-12-10 09:08:18 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-12-10 09:08:18 +09:00
2025-11-26 13:14:18 +09:00
2025-12-10 09:08:18 +09:00
2025-11-30 07:16:50 +09:00
2025-12-07 03:12:27 +09:00
2025-12-10 09:08:18 +09:00
2025-11-05 12:31:14 +09:00
2025-11-20 07:32:30 +09:00
2025-11-05 12:31:14 +09:00
2025-12-04 14:22:48 +09:00
2025-12-07 03:12:27 +09:00
2025-11-05 12:31:14 +09:00
2025-11-14 01:02:00 +09:00
2025-11-14 05:41:49 +09:00
2025-12-07 22:49:28 +09:00
2025-12-10 09:08:18 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-27 04:35:47 +09:00
2025-11-27 04:35:47 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-02 20:32:22 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-21 01:23:59 +09:00
2025-11-05 12:31:14 +09:00
2025-12-10 09:08:18 +09:00
2025-12-07 22:49:28 +09:00
2025-11-07 01:27:04 +09:00
2025-11-21 03:20:42 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-04 16:21:54 +09:00
2025-12-10 09:08:18 +09:00
2025-11-11 00:02:24 +09:00
2025-11-28 18:16:32 +09:00
2025-12-01 16:37:59 +09:00
2025-11-22 09:34:35 +09:00
2025-12-01 22:06:10 +09:00
2025-12-10 09:08:18 +09:00
2025-12-10 09:08:18 +09:00
2025-11-20 07:32:30 +09:00
2025-11-20 07:32:30 +09:00
2025-12-10 22:57:26 +09:00
2025-12-02 19:13:28 +09:00
2025-11-28 16:08:44 +09:00
2025-12-03 20:42:28 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-12 01:04:55 +09:00
2025-11-05 12:31:14 +09:00
2025-11-27 05:19:56 +09:00
2025-11-10 18:04:08 +09:00
2025-12-12 00:53:42 +09:00
2025-12-10 09:08:18 +09:00
2025-11-26 13:14:18 +09:00
2025-11-17 03:22:27 +09:00
2025-11-21 23:00:24 +09:00
2025-11-09 16:49:34 +09:00
2025-11-08 23:53:25 +09:00
2025-11-17 03:22:27 +09:00
2025-11-09 18:55:50 +09:00
2025-11-14 15:00:13 +09:00
2025-11-14 15:00:13 +09:00
2025-11-14 14:29:05 +09:00
2025-11-09 18:55:50 +09:00
2025-11-14 14:29:05 +09:00
2025-11-09 18:55:50 +09:00
2025-11-14 15:32:07 +09:00
2025-11-09 18:55:50 +09:00
2025-12-04 16:21:54 +09:00
2025-11-13 06:50:20 +09:00
2025-12-12 03:12:28 +09:00
2025-12-05 23:41:01 +09:00
2025-12-12 19:19:25 +09:00
2025-12-11 07:40:22 +09:00
2025-12-11 19:17:30 +09:00
2025-12-12 05:51:27 +09:00
2025-12-11 23:51:48 +09:00
2025-12-11 22:45:14 +09:00
2025-12-11 02:39:32 +09:00
2025-12-11 13:32:46 +09:00
2025-12-12 06:37:06 +09:00
2025-12-12 19:19:25 +09:00
2025-12-13 18:46:11 +09:00
2025-12-12 19:19:25 +09:00
2025-12-12 06:37:06 +09:00
2025-12-11 13:32:46 +09:00
2025-12-11 15:29:59 +09:00
2025-12-12 03:12:28 +09:00
2025-12-07 03:12:27 +09:00
2025-12-05 23:41:01 +09:00
2025-12-10 09:08:18 +09:00
2025-12-04 14:22:48 +09:00
2025-12-05 23:41:01 +09:00
2025-12-10 09:08:18 +09:00
2025-11-20 07:32:30 +09:00
2025-11-20 07:32:30 +09:00
2025-12-03 21:56:52 +09:00
2025-12-04 04:58:22 +09:00
2025-12-14 16:28:23 +09:00
2025-11-27 03:18:33 +09:00
2025-12-10 09:08:18 +09:00
2025-11-06 21:54:12 +09:00
2025-11-14 01:02:00 +09:00
2025-11-26 13:14:18 +09:00
2025-12-11 22:16:07 +09:00
2025-12-11 22:16:07 +09:00
2025-11-29 06:47:13 +09:00
2025-12-04 16:21:54 +09:00
2025-12-12 16:26:42 +09:00
2025-11-28 00:43:07 +09:00
2025-12-10 09:08:18 +09:00
2025-12-10 09:08:18 +09:00
2025-11-29 06:57:03 +09:00
2025-12-13 22:03:27 +09:00
2025-12-02 20:25:48 +09:00
2025-12-02 20:25:48 +09:00
2025-11-09 23:15:02 +09:00
2025-12-04 18:53:04 +09:00
2025-12-11 12:53:03 +09:00
2025-12-10 09:08:18 +09:00
2025-12-15 00:32:25 +09:00
2025-12-10 09:08:18 +09:00
2025-11-05 12:31:14 +09:00
2025-11-07 01:27:04 +09:00
2025-11-26 14:45:26 +09:00
2025-12-10 09:08:18 +09:00
2025-11-30 11:06:44 +09:00
2025-12-13 15:31:08 +09:00
2025-11-07 01:27:04 +09:00
2025-12-07 03:12:27 +09:00
2025-11-05 12:31:14 +09:00
2025-12-10 09:08:18 +09:00
2025-11-07 01:27:04 +09:00
2025-11-05 12:31:14 +09:00
2025-12-05 23:41:01 +09:00
2025-12-10 09:08:18 +09:00
2025-11-06 21:54:12 +09:00
2025-11-07 22:34:24 +09:00
2025-11-05 12:31:14 +09:00