Skip to content

Runtime shrink: lazy HashTable strtol decl (peer #35626 / #31988) - #35747

Merged
PurHur merged 1 commit into
masterfrom
fix/hash-table-lazy-strtol-runtime-shrink
Aug 29, 2026
Merged

PurHur merged 1 commit into
masterfrom
fix/hash-table-lazy-strtol-runtime-shrink

Conversation

@PurHur

@PurHur PurHur commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

Root cause

HashTable::implement() eagerly called ensureLibcStrtol() at entry even though strtol is only used on the numeric-string key lookup path. Every compile (including hello-world) paid for a libc extern that most scripts never touch.

Verification

./script/aot-smoke.sh
# aot-smoke: 8 passed, 0 failed

./script/phpunit.sh --filter 'HashTableLazyStrtolRuntimeShrinkTest|StrtolRuntimeShrinkTest'
# OK (7 tests, 32 assertions)

Not run: ./script/release-readiness.sh (pillar 1 already green on master this run), full differential sweep, ci-fast.sh (006 benchmark README drift pre-existing on master).

Made with Cursor

HashTable::implement no longer calls ensureLibcStrtol on every full load;
numeric-string key lookup ensures the module-local strtol(3) decl only
when that path is emitted. Reduces cold-build LLVM surface for hello-world
(#31894 / #32122 .1 mint class).

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 9cd37e7 into master Aug 29, 2026
1 check passed
@PurHur
PurHur deleted the fix/hash-table-lazy-strtol-runtime-shrink branch August 29, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant