Repository navigation
defk-o08.2: compiler time measured warm in a fresh process; the chain measured again against its budget - #68
Merged
Conversation
… measured again against its budget DEFK_COMPILE_TIME=<file> makes every module compile once more in a fresh process and log its microseconds and reductions; dev/compile_time.exs compares interleaved rounds of two checkouts. The old method timed a first compile, which under mix dump_c waited ~1 s for the compiler's own modules, and a second compile in the same process varied twofold. Measured again: the symbolic-bounds chain +13.4% time / +20.8% reductions, the refactors after it +13.5% / +7.3%, together ~29% past the compiler before step 1 (docs/performance.md 6.38, ADR-0007's cost note).
2 tasks done
DanielLuning
pushed a commit
that referenced
this pull request
Oct 20, 2026
DanielLuning
pushed a commit
that referenced
this pull request
Oct 20, 2026
2 tasks done
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 changed
Compiler time gets a permanent, reliable harness, and the symbolic-bounds chain is measured again against its +15% ceiling (ADR-0007).
DEFK_COMPILE_TIME=<file>(read inDefk.__before_compile__,timed_compile/2). Every module compiles once for its result and once more in a fresh process; that second compile is measured and its microseconds and reductions are appended to the file. Without the variable, nothing changes, as withDEFK_DUMP_C.dev/compile_time.exs: compares interleaved rounds of two checkouts on the modules both have, by time or with--reductions, with and withoutSatEx.Kernels.docs/agents/runs.md: the harness replaces the temporary-patch method.docs/performance.md: a new entry 6.38.Results
Why the old method was wrong:
mix dump_c,libandtest/supportcompile in parallel, so the first kernel module waited about 1 s for the compiler's own modules: of a 2.5 s round, about 1.0 s was that wait.SatEx.Kernelstook either about 240 or about 510 ms on the same code.SatEx.Kernelsagree to ±2% in time and ±0.05% in reductions.Measured again (99 shared modules, two interleaved rounds each, medians):
23e27970) → after step 4 (a371dcab): the chainmain(b90ed0ff): thex3aandrt2refactorsmainSo the compiler is about twice as far past its state before step 1 as the ceiling allows. The copy-analysis cut (
defk-o08.3, the next PR) takes 9% of this back. Provisional: the laptop was on battery, with no quiet-machine check.How it was checked
mix cion the laptop (macOS) passed: 2300 tests, Credo found no issues, Dialyzer reported 0 errors.The baseline and middle checkouts ran with the same harness as throwaway patches. The baseline also had the
DEFK_NO_CCtooling commit (cbfb5725) applied, so that no round rancc.Touches a promised surface? No:
DEFK_COMPILE_TIMEis a dev knob likeDEFK_DUMP_C, not documented for users. NoCHANGELOG.mdentry.Touches
test/stability/? No.