Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/spec/perf/19-engine-v.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Loading