# 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 - 全サイズクラステスト ## 🔨 ビルド ```bash # 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とは別実装です:** 1. **Phase 6-1 (bench_tiny_simple)** - 新しい独立実装 (`hakmem_tiny_simple.c`) - tcache風の ultra-simple design - 478.60 M ops/sec 2. **既存のHAKMEM (bench_tiny_hot_hakmem)** - 現在のmainline実装 - Magazine-based design - ~50-60 M ops/sec Phase 6-1 は**実験的プロトタイプ**で、まだmainlineには統合されていません。 ## 🎯 Phase 6 ロードマップ - [x] **Phase 6-1**: Ultra-Simple Fast Path (完了) - [ ] **Phase 6-2**: Comprehensive benchmarking - [ ] **Phase 6-3**: Learning layer implementation - [ ] **Phase 6-4**: Mainline integration (未定)