From 15f3ca6503c412e0d1a9baac59f05474f30894ea Mon Sep 17 00:00:00 2001 From: tamnd <1218621+tamnd@users.noreply.github.com> Date: Wed, 2 Dec 2026 14:59:17 +0700 Subject: [PATCH] Write spec perf/19.30, the end of M13 This section gives the state of main at the end of M13, the steps that are not merged and why the goal of 01 is not met. The gap to the goal is the cost of one step in the verified subset, and a change of this cost needs a change of the trust model. --- docs/spec/perf/19-engine-v.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/spec/perf/19-engine-v.md b/docs/spec/perf/19-engine-v.md index 6fcc7bf..08f69da 100644 --- a/docs/spec/perf/19-engine-v.md +++ b/docs/spec/perf/19-engine-v.md @@ -802,3 +802,18 @@ The repeats use 0.59 M of the 36.20 M work steps (1.6%). A memo with no loss thu ### 19.29.3 Result Engine V does each eval, infer and equality of a key almost one time, and the compares that the compare with no eval misses are mostly the check of the bodies of the lambdas. So the count of the work steps of engine V is near the least count for its keys. With 19.20.2, which finds that nano-lean does near the same steps, the gap of the check is the cost of one step, and not the count of the steps. 19.24 and 19.26 show that this cost comes from the reads of the store and of the arena, with the bounds checks and the decode of the verified subset. No change in 19.21 to 19.29 removes more than about 3% of this cost. + +## 19.30 The end of M13 + +M13 (#344) ends with this section. The state on main at the end of M13: + +| Input | Callgrind in CI, without `sha256::compress` | Without the axiom walk of the JSON report | Goal of 01 | +|---|---|---|---| +| `init` | 43.93 G | about 41.3 G | 22.4 G | +| `std` | 75.94 G | | 34.6 G | + +The profile of CI runs with `--report`, so its count has the walk of `Axioms::of_expr` (2.59 G inclusive on `init`). The Arena command has no `--report`, so it does not do this walk. + +The steps 19.22 and 19.24 to 19.28 each give less than 1%, or they give a wrong verdict, so they are not merged. 19.29 shows that engine V does near the least count of work steps for its keys. Thus the gap to the goal is the cost of one step. This cost comes from the reads of the store and of the arena in the verified subset, with the bounds checks and the decode of each node. + +A change of this cost needs a hot path outside the verified subset, with pointers and a fixed node layout. This change is a change of the trust model of rulean, and it is not part of the plan. Thus the goal of 01 is not met. The rival counts of 18.2 and the count of about 41.3 G give these ratios on `init`: rulean is about 1.6 times slower than nano-lean, about 5.7 times faster than nanoda and about 10 times faster than official. The rival counts include the hash work of each rival, and the rulean count does not include `sha256::compress`, so these ratios are approximate.