Repository navigation
eager: apply out of line - #59
Merged
Merged
Conversation
Inlined into runner.cpp's parse_dag_into, apply()'s step loop reloads the arena and the stack on every step. Out of line it takes 2.2-5.6% fewer instructions: loading the compiler 148.0M -> 139.7M, compiling compiler.lamb 828.0M -> 782.2M. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ffv5AybPTpV56D5vuayQr
olydis
force-pushed
the
claude/tc-performance-optimizations-rqtyzl-apply
branch
from
October 2, 2026 12:26
083ffb1 to
21fd5a4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds one attribute:
[[gnu::noinline]]onBasicEagerGraphNilMmap32::apply. Whenapplyis inlined intorunner.cpp'sparse_dag_into, the step loop reloads the arena and the stack on every step.Cachegrind instruction counts against main (16dfe07, jets on):
With
RUNNER_JETS=0, compiling compiler.lamb goes from 837.1M to 790.4M instructions (−5.6%).Steps and output are unchanged.
test.shpasses underCandC.UTF-8(runner 21, reduce 4).🤖 Generated with Claude Code
https://claude.ai/code/session_018ffv5AybPTpV56D5vuayQr