[1/2] Defer tactic argument rendering until trace dump - #1
Draft
Wilson1211 wants to merge 2 commits into
Draft
Wilson1211 wants to merge 2 commits into
Wilson1211 wants to merge 2 commits into
Conversation
Wilson1211
force-pushed
the
perf/lazy-tactic-arguments
branch
from
September 21, 2026 01:26
9d0214e to
c388c96
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.
Summary
Lazy.texptrace_dumpThis first PR intentionally contains only the core implementation: one commit and one changed file.
Stack
PR #2 is a draft based on
main. After this PR merges, GitHub will remove the shared core commit from PR #2, leaving only its test and documentation diff.Motivation
Tactic argument rendering can dominate trace collection when a tactic has reached its record limit. The current replacement path renders the arguments for every candidate before sorting, even when that candidate is immediately discarded.
A downstream s2n-bignum experiment with relaxed retention limits measured:
mldsa_caddq: 1,549 s -> 639 s (2.4x faster), with all 414 trace files byte-for-byte identicalbignum_mux: 160 s -> 162 s, with all 352 trace files byte-for-byte identicalThe experiment report and breakdown are available in sep17-report.md.
Validation
tracerandtypes_testwith OCaml 5.4examples/*.answer; both suites matchedScope and known risk
This PR changes tactic records only. Conversion records remain eager and should be considered separately.
Lazy rendering observes HOL Light printer settings at dump time rather than at tactic execution time. The two downstream proof comparisons above produced identical output, but they do not prove equivalence for proofs that change printer settings between recording and dumping. This PR remains a draft so that this tradeoff and any additional validation can be reviewed before merge.