Conversation
|
!bench |
🔬 F* Performance ComparisonBaseline: Summary
Totals: Memory: 685.7 MiB | Time: +116.7s Change Distribution
Heavy Tests (baseline > 100 MiB, n=1515)
📉 Top 20 Memory Improvements
📈 Top 20 Memory Regressions
⬇️ Top 20 Time Improvements
⬆️ Top 20 Time Regressions
📋 Full Comparison (2036 tests)
|
Our bench pipeline measures memory usage via ramon, which reports the memory of the whole cgroup (including Z3). This can be fixed, but can vary significantly anyway due to randomness is the system and the OCaml GC. Luckily, OCaml provides a way to query the peak bytes used by the heap, which we can write out and parse when benchmarking. This makes memory measurements much more stable (but not fully determistic).
|
!rebase |
Port key ideas from PR FStarLang#3970 (subst improvements): 1. delay: Don't coalesce nested Tm_delayed nodes. Previously, delay would compose substitutions when encountering an existing Tm_delayed, which breaks structural sharing and causes quadratic memory blowup on deeply nested let-expressions (issue FStarLang#3800). 2. push_subst: Handle Tm_delayed by recursing through compress_subst instead of failing. This allows nested delayed substitutions to be resolved incrementally. 3. Tm_uvar: Use simple compose_subst instead of compose_uvar_subst in push_subst. 4. compress: Simplified to a single recursive function that resolves uvars and pushes substitutions in one pass. Benchmarks (1116 matched tests, heavy tests > 100 MiB): Memory: median +0.0%, mean -0.1%, range [-20.4%, +4.3%] (Main impact is on pathological cases like issue FStarLang#3800.) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5bf434f to
4b0f182
Compare
|
!bench |
🔬 F* Performance ComparisonBaseline: Summary
Totals: Memory: 675.4 MiB | Time: +90.8s Change Distribution
Heavy Tests (baseline > 100 MiB, n=804)
📉 Top 20 Memory Improvements
📈 Top 20 Memory Regressions
⬇️ Top 20 Time Improvements
⬆️ Top 20 Time Regressions
📋 Full Comparison (2042 tests)
|
a138fd5 to
512e376
Compare
Port key ideas from PR FStarLang#3970 (subst improvements):
delay: Don't coalesce nested Tm_delayed nodes. Previously, delay
would compose substitutions when encountering an existing Tm_delayed,
which breaks structural sharing and causes quadratic memory blowup
on deeply nested let-expressions (issue Performance blow up FStarLang/FStar#3800).
push_subst: Handle Tm_delayed by recursing through compress_subst
instead of failing. This allows nested delayed substitutions to be
resolved incrementally.
Tm_uvar: Use simple compose_subst instead of compose_uvar_subst
in push_subst.
compress: Simplified to a single recursive function that resolves
uvars and pushes substitutions in one pass.
Benchmarks (1116 matched tests, heavy tests > 100 MiB):
Memory: median +0.0%, mean -0.1%, range [-20.4%, +4.3%]
(Main impact is on pathological cases like issue FStarLang#3800.)
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com