You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(perf): resolve the contradictory headline, record the closing program
The measurement table still told readers to quote 121.9s vs 59.6s =
2.05x while the harness section below said 1.42x and marked 2.05x
superseded. Fixed: the table now carries the local-block-file row and
points at the harness section.
Also records what the harness fix revealed. Apply is 76.7s against
Core's 55.80s, a 20.9s gap, and the identified per-stage deltas now sum
to 20.6s -- the gap is fully accounted for, with no large unexplained
remainder. Closing all of them reaches 64.0s = 1.07x Core.
Every item is individually 1.04-1.07x, at or under the single-candidate
gate, so the next session should run them as one program gated on the
cumulative number rather than as five candidates, start with merkle
(pure function, immediately falsified), and settle block_body_persist
on policy rather than deleting it to win a benchmark.
**Quote the matched pair, not a cross-run ratio.**After the one-shot parse: **121.9s vs Core 59.6s = 2.05×** (apply 82.0s alone is 1.38× Core's whole run). Total self-improvement over the `4700c25` baseline is **3.4×**.
50
+
**Quote 84.6s vs 59.6s = 1.42×.**Every row above it fetched blocks over REST while Core read local `blk*.dat` files, so those ratios measure the harness as much as the engine — see the harness section below. Total self-improvement over the `4700c25` baseline is **4.6×**.
50
51
51
52
### GoCoin: bitcoin-rs wins, and by more than the raw numbers show
52
53
@@ -334,6 +335,28 @@ Why ours is ~1.5× slower on the same code is unexplained and worth knowing, but
334
335
335
336
Do not re-open script verification: it is a measured tie, and four marshalling micro-optimizations plus a pool-width and threshold sweep are already closed above.
336
337
338
+
## The gap is now fully accounted for, and it is a program of small items
339
+
340
+
With the harness matched, the arithmetic closes for the first time. Apply is 76.7s against Core's 55.80s, a **20.9s** gap, and the identified per-stage deltas sum to **20.6s** — there is no longer a large unexplained remainder hiding in the measurement.
Closing all of them lands at **64.0s against Core's 59.6s = 1.07×**, which is parity within a rounding of the noise band.
353
+
354
+
**This changes how the remaining work should be run.** Every item is individually 1.04–1.07×, at or under the 1.05× single-candidate gate, so none of them will ever look convincing on its own — and at ±5% single-run noise on an 84.6s run, a 3.5s effect is at the edge of what a 3× median can resolve. The next session should therefore:
355
+
356
+
1. Treat these as **one program, not five candidates**. Gate the program on the cumulative number, and use paired interleaved runs with more than three repetitions to resolve each step.
357
+
2. Start with `block_rules` (merkle root over scalar SHA-256 against Core's AVX2) — it is a pure function, immediately falsified by any error since every block checks it, and therefore the lowest-risk of the five.
358
+
3. Decide `block_body_persist` on policy, not performance: Core's reindex writes no blocks, so it is either excluded from the ratio or matched by having Core do it. Do not simply delete it to win a benchmark; a real node must store blocks.
359
+
337
360
## Guidance
338
361
339
362
1.**Attribute a stage by disabling it, not by reading a profiler.**`perf` was unavailable here (`perf_event_paranoid=4`, no sudo), but the open question — is `script_parallel`'s ~0.93 ms/block genuine secp256k1 work or rayon dispatch overhead? — is binary, so forcing `MIN_PARALLEL_SCRIPT_CHECKS = usize::MAX` answered it in one run: the replay went 173.1s → **313.3s** and the stage 63s → **227.6s**. Genuine crypto. That immediately reframed the number: 227.6s → 63s is only **3.6× from a 16-thread pool**, so the pool width was the binding constraint, and widening it to 32 bought 1.10× (`0e2dda5`). Prefer this disable-the-stage technique whenever a hypothesis is binary; it needs no tooling and cannot be argued with.
0 commit comments