Repository navigation
Conversation
EagerGraphNilMmap32Jets answers arboretum's Quoted._whnf (src/quoted/spine.lamb), the fuel-counted head reducer under Certify.Size: apply(_whnf fuel, t), recognized in the S-rule branch after the memo by one compare and a match against a template that keying derives from the tree (trees/spineWhnf.dag) on every clear(). The loop is in eager-graph-nil-mmap-32-jets.hpp, on an explicit stack; a shape spine.lamb never builds is left to the rules. Its answer is remembered as skip_line's, counted in jets=, and RUNNER_JETS=0 keys nothing. No theorem covers it: runtimeJets_sound is skip_line's alone. Every test of a build loaded and dumped by one runner, main -> this: arboretum 2,126.2M -> 842.7M steps, 159.9 -> 74.1 s; forest 2,971.2M -> 1,529.7M, 224.3 -> 111.8 s; dumps byte-identical. From empty caches: arboretum ./build.sh 65.8 -> 44.3 s, forest ./build/full.sh 167.4 -> 154.3 s. Where it never fires, compiling compiler.lamb takes 3.6% more instructions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ffv5AybPTpV56D5vuayQr
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.
What changes
EagerGraphNilMmap32Jetsnow answers arboretum'sQuoted._whnf(src/quoted/spine.lamb) natively. This is the fuel-counted head reducer underCertify.Size.implementation/lean/Cpp/trees/spineWhnf.dagisQuoted._whnf:4at arboretum e3df589. Its md5 is the same in forest's pinned arboretum.embed.mjsembeds it intojets.hppandJets/Trees.lean; both are purely additive.apply(_whnf fuel, t).clear(), the evaluator reduces_whnf △and_whnf (△△)by the rules and diffs them into a template with 6 fuel holes. It throws if the fuel shows up anywhere other than as-is.recall(), a single compareu' == xgates a template match, and the match recovers the fuel.eager-graph-nil-mmap-32-jets.hpp(jets::SpineWhnf), kept apart from the evaluator.aandcas frames on an explicit stack. Nesting depth is at most the fuel.remember().RUNNER_STATScounts it injets=.RUNNER_JETS=0nothing is keyed.apply(); inlined, it costs 2.3% more instructions.Measured effect
Same machine, back to back. Base is the runner at main b873b56.
./build.sh, empty caches./build/full.shloads the build's whole canonical bundle, with every expect test included, thendumps it. The jet answers 243,761 calls in arboretum and 278,370 in forest (jets=less skip_line's 25). In arboretum the gate admits 410,982 calls: every one the template matched was answered, and the other 167,221 (other trees sharingx) fail the match. Collections drop from 7 to 2 (arboretum) and from 10 to 4 (forest).clear(), two of them here (0.5%).Validation
implementation/cpp/dag-machine/test.shpasses underLC_ALL=CandLC_ALL=C.UTF-8: 33 PASS each, runner 21/21.test-jets.cpptests for the new jet:clear(), including a collection in the middle of keying.test-jets.cpp.lake build --wfailpasses. OnlyTrees.leangrows; no theorem changed.RUNNER_JETS=0: rbase and this runner take identical steps (2,124,623,037) and produce the same dump.git status --porcelain --ignore-submodulesis clean. Thesubmodules/lambadademo env-dags diff is already on main, and is identical in the base and jet builds.git diff --exit-code --ignore-submodulesis clean.Caveats
List.concat,fix), or to the compiler silently turns the jet off. Results stay correct, but builds go back to the old speed. A canary in arboretum's CI (jets > 0on one Certify test) would catch this; it is not part of this PR.I^4000 Kover an argument list ending in a stem takes 8.4 s with the jet against 1.4 s by the rules, ×4 per doubling. spine.lamb never builds one (_whnfis private to it), and the arboretum replay never meets one (every template match was answered).Merge order
spineWhnf.dagbefore merging. The regeneration command is inimplementation/lean/Cpp/README.md.🤖 Generated with Claude Code
https://claude.ai/code/session_018ffv5AybPTpV56D5vuayQr