sprinter-cc: --max-allocs 100000 по умолчанию для пользовательского кода

Тот же приём, что во fast-библиотеках (786836e): агрессивная
регистровая аллокация SDCC.  --max-allocs N переопределяет (меньшее
значение = быстрее компиляция).

Замер (47 программ): mdview -235, banklocl -149, fbench -110,
filetest -90, ls -81, solidt -69 и т.д.; 4 микро-роста (+1..+12 —
другие развязки аллокатора, шум).  Полная сборка ~2 мин -> ~4:15.
MAME: filetest/bgitest/seek (с big.txt, скриншот пользователя) зелёные.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 22:35:44 +03:00
parent 786836e2e7
commit 78161561e7
2 changed files with 40 additions and 36 deletions
+8 -4
View File
@@ -34,9 +34,9 @@
# --bank N=FILE.c compile FILE.c as bank N; repeatable; pulls crt0_banked
# automatically and adds -Wl-b_BANKN=0x{N}C000
# --mkexe FLAG extra mkexe flag (repeatable; e.g. --mkexe -p --mkexe 0)
# --max-allocs N SDCC --max-allocs-per-node (default: SDCC's 3000).
# Higher values give smaller/faster code at the cost of
# compile time; 10000..100000 is a reasonable range.
# --max-allocs N SDCC --max-allocs-per-node (default: 100000 — smaller/
# faster code at the cost of compile time; pass a lower
# value, e.g. SDCC's own default 3000, to compile faster).
# --debug enable runtime diagnostics — defines DEBUG_RT for both
# sdcc (-DDEBUG_RT) and the crt0 assembly (prepended
# `DEBUG_RT = 1`). Exposes runtime introspection symbols
@@ -88,7 +88,11 @@ SOURCES=()
LD_EXTRA=()
MKEXE_EXTRA=()
BANK_SPECS=() # entries like "1=engine.c"
MAX_ALLOCS="" # if set, passed to sdcc as --max-allocs-per-node
MAX_ALLOCS="100000" # sdcc --max-allocs-per-node; дефолт 100000 — агрессивная
# регистровая аллокация (медленнее компиляция, меньше/
# быстрее код; как fast-сборки библиотек). --max-allocs N
# переопределяет (например 3000 = дефолт SDCC для скорости
# компиляции).
GFX_MODE="" # "256" → link BGI graphics.h driver sprinter_gfx256.lib
SAFE_LIBS=0 # if 1, prefer *_safe.lib variants (fallback to standard)