Moe Charm (CI)
88717a8737
Phase 4 E1: ENV Snapshot Consolidation - GO (+3.92% avg, +4.01% median)
Target: Consolidate 3 ENV gate TLS reads → 1 TLS read
- tiny_c7_ultra_enabled_env(): 1.28% self
- tiny_front_v3_enabled(): 1.01% self
- tiny_metadata_cache_enabled(): 0.97% self
- Total overhead: 3.26% self (perf profile analysis)
Implementation:
- core/box/hakmem_env_snapshot_box.h (new): ENV snapshot struct & API
- core/box/hakmem_env_snapshot_box.c (new): TLS snapshot implementation
- core/front/malloc_tiny_fast.h: Migrated 5 call sites to snapshot
- core/box/tiny_legacy_fallback_box.h: Migrated 2 call sites
- core/box/tiny_metadata_cache_hot_box.h: Migrated 1 call site
- core/bench_profile.h: Added hakmem_env_snapshot_refresh_from_env()
- Makefile: Added hakmem_env_snapshot_box.o to build
- ENV gate: HAKMEM_ENV_SNAPSHOT=0/1 (default: 0, research box)
A/B Test Results (Mixed, 10-run, 20M iters):
- Baseline (E1=0): 43,617,549 ops/s (avg), 43,562,895 ops/s (median)
- Optimized (E1=1): 45,327,239 ops/s (avg), 45,309,218 ops/s (median)
- Improvement: avg +3.92%, median +4.01%
Decision: GO (+3.92% >= +2.5% threshold)
- Action: Keep as research box (default OFF) for Phase 4
- Next: Consider promotion to default in MIXED_TINYV3_C7_SAFE preset
Design Rationale:
- Shape optimizations (B3, D3) reached saturation (+0.56% NEUTRAL)
- Shift to memory/TLS overhead optimization (new optimization frontier)
- Pattern: Similar to existing tiny_front_v3_snapshot (proven approach)
- Expected: +1-3% from 3.26% ENV overhead → Achieved: +3.92%
Technical Details:
- Consolidation: 3 TLS reads → 1 TLS read (66% reduction)
- Learner interlock: tiny_metadata_cache_eff pre-computed in snapshot
- Version sync: Refreshes on small_policy_v7_version_changed()
- Fallback safety: Existing ENV gates still available when E1=0
🤖 Generated with Claude Code
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-14 00:59:12 +09:00
..
2025-12-14 00:59:12 +09:00
2025-12-14 00:59:12 +09:00
2025-12-05 23:41:01 +09:00
2025-12-10 09:08:18 +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-13 22:03:27 +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-13 18:46:11 +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