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>
52 lines
1.3 KiB
Bash
Executable File
52 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Lists "knobs" that easily cause benchmark drift:
|
|
# - bench_profile defaults (core/bench_profile.h)
|
|
# - getenv-based gates (core/**)
|
|
# - cleanenv forced OFF/ON (scripts/*cleanenv*.sh + allocator matrix scripts)
|
|
#
|
|
# Usage:
|
|
# scripts/list_hakmem_knobs.sh
|
|
|
|
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "${root_dir}"
|
|
|
|
if ! command -v rg >/dev/null 2>&1; then
|
|
echo "[list_hakmem_knobs] ripgrep (rg) not found" >&2
|
|
exit 1
|
|
fi
|
|
|
|
print_block() {
|
|
local title="$1"
|
|
echo ""
|
|
echo "== ${title} =="
|
|
}
|
|
|
|
uniq_sort() {
|
|
sort -u | sed '/^$/d'
|
|
}
|
|
|
|
print_block "bench_profile defaults (core/bench_profile.h)"
|
|
rg -n 'bench_setenv_default\("HAKMEM_[A-Z0-9_]+",' core/bench_profile.h \
|
|
| rg -o 'HAKMEM_[A-Z0-9_]+' \
|
|
| uniq_sort
|
|
|
|
print_block "getenv gates (core/**)"
|
|
rg -n 'getenv\("HAKMEM_[A-Z0-9_]+"\)' core \
|
|
| rg -o 'HAKMEM_[A-Z0-9_]+' \
|
|
| uniq_sort
|
|
|
|
print_block "cleanenv forced exports (scripts/*cleanenv*.sh)"
|
|
rg -n 'export HAKMEM_[A-Z0-9_]+=|unset HAKMEM_[A-Z0-9_]+' scripts \
|
|
| rg -o 'HAKMEM_[A-Z0-9_]+' \
|
|
| uniq_sort
|
|
|
|
print_block "allocator matrix scripts (scripts/run_allocator_*matrix*.sh)"
|
|
rg -n 'export HAKMEM_[A-Z0-9_]+=|HAKMEM_PROFILE=|LD_PRELOAD=' scripts/run_allocator_*matrix*.sh \
|
|
| rg -o 'HAKMEM_[A-Z0-9_]+' \
|
|
| uniq_sort
|
|
|
|
echo ""
|
|
echo "Done."
|