Major Features: - Debug counter infrastructure for Refill Stage tracking - Free Pipeline counters (ss_local, ss_remote, tls_sll) - Diagnostic counters for early return analysis - Unified larson.sh benchmark runner with profiles - Phase 6-3 regression analysis documentation Bug Fixes: - Fix SuperSlab disabled by default (HAKMEM_TINY_USE_SUPERSLAB) - Fix profile variable naming consistency - Add .gitignore patterns for large files Performance: - Phase 6-3: 4.79 M ops/s (has OOM risk) - With SuperSlab: 3.13 M ops/s (+19% improvement) This is a clean repository without large log files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1.8 KiB
1.8 KiB
Phase 6 Tiny Allocator Benchmarks
📁 ファイル構成
ベンチマーク
bench_tiny_simple.c- Phase 6-1 Ultra-Simple Fast Path ベンチマーク- 10M iterations LIFO pattern
- 独立した実装 (
core/hakmem_tiny_simple.{h,c}) - 既存のHAKMEM allocatorとは別実装
テスト
test_tiny_simple.c- Phase 6-1 機能テスト- 基本的なalloc/free
- LIFO pattern
- 全サイズクラステスト
🔨 ビルド
# Phase 6-1 ベンチマーク
gcc -O2 -I../../../.. \
-o bench_tiny_simple \
bench_tiny_simple.c \
../../../../core/hakmem_tiny_simple.c \
-lrt
# Phase 6-1 テスト
gcc -O2 -I../../../.. \
-o test_tiny_simple \
test_tiny_simple.c \
../../../../core/hakmem_tiny_simple.c \
-lrt
📊 測定結果 (2025-11-02)
Phase 6-1: Ultra-Simple Fast Path
bench_tiny_simple (64B LIFO, 10M iterations):
Throughput: 478.60 M ops/sec
Cycles/op: 4.17 cycles
Hit rate: 100.00%
比較:
- System glibc: ~156-175 M ops/sec (測定により変動)
- Phase 6-1: 478.60 M ops/sec (+174% ~ +206%)
⚠️ 重要な注意
Phase 6-1 は既存のHAKMEM allocatorとは別実装です:
-
Phase 6-1 (bench_tiny_simple)
- 新しい独立実装 (
hakmem_tiny_simple.c) - tcache風の ultra-simple design
- 478.60 M ops/sec
- 新しい独立実装 (
-
既存のHAKMEM (bench_tiny_hot_hakmem)
- 現在のmainline実装
- Magazine-based design
- ~50-60 M ops/sec
Phase 6-1 は実験的プロトタイプで、まだmainlineには統合されていません。
🎯 Phase 6 ロードマップ
- Phase 6-1: Ultra-Simple Fast Path (完了)
- Phase 6-2: Comprehensive benchmarking
- Phase 6-3: Learning layer implementation
- Phase 6-4: Mainline integration (未定)