Keep the four path walks: one loop fails the allocation gate
This commit is contained in:
+9
-7
@@ -676,10 +676,12 @@ though `hasRead` states the same stop rule. Valid while the two differ in where
|
|||||||
## The four path walks are four loops
|
## The four path walks are four loops
|
||||||
|
|
||||||
2026-09-28, larv-review on systems-architect's finding; approved 2026-09-28 by lilleman.
|
2026-09-28, larv-review on systems-architect's finding; approved 2026-09-28 by lilleman.
|
||||||
Goals 2 and 11: `pathCheck`, `pathCover`, `pathProbe` and `pathDraw` each loop over
|
Re-tested 2026-09-29 by collapsing them into one loop switching on a mode field.
|
||||||
`stepInto` and `table.route` themselves, and `descend` builds its probe in place, so the
|
Goals 2 and 11: `pathCheck`, `pathCover`, `pathProbe` and `pathDraw` stay four loops.
|
||||||
probe's `drawn` map stays on the stack; its caller always builds that map, so `readRow`
|
One loop fails `perf_test.go`: the check's leaves, the probe's selectors and the errors
|
||||||
never tests it for nil. One walk calling them through an interface or a type parameter
|
naming a level leak the walker's contents, and Go tracks a struct's fields as one, so
|
||||||
leaks the walker and the pins it holds, an allocation per reference read. Valid while
|
the draw's pins, arm and hold leak with them. Held by pointer, a repeat of a reference
|
||||||
Go's escape analysis treats a call through an interface or a type parameter as leaking
|
path rose from 66 to 106 allocations; copied into the walker by value,
|
||||||
its receiver.
|
`BenchmarkHeld` rose from 5 to 9. A call through an interface or a type parameter leaks
|
||||||
|
the walker the same way. Valid while Go's escape analysis tracks a struct's fields as
|
||||||
|
one and treats such a call as leaking its receiver.
|
||||||
|
|||||||
@@ -31,13 +31,6 @@ on 2026-09-29 a third time (Navigation 7.0, Locality 5.6, Shape 6.3, Self-suffic
|
|||||||
|
|
||||||
This round, in order:
|
This round, in order:
|
||||||
|
|
||||||
- Collapse the four path walks into one loop switching on a plain mode field, check,
|
|
||||||
cover, probe or draw, with no call through an interface or a type parameter, and run
|
|
||||||
it against `perf_test.go`'s allocation gate. It holds: replace the decision "The four
|
|
||||||
path walks are four loops" with one recording a single loop, and land the collapse;
|
|
||||||
all nine seats named the four loops among the hardest. It fails: keep the loops, and
|
|
||||||
rewrite that decision's rationale to match `descend` and `pathProbe.readRow` today,
|
|
||||||
where `readRow` makes `drawn` on first use.
|
|
||||||
- Key the survey's visits and reads by a pin set's rows spelled as a string, and delete
|
- Key the survey's visits and reads by a pin set's rows spelled as a string, and delete
|
||||||
`pinsID`, `pinsLink` and `readSurvey.pinIDs`: five seats stalled on the interning.
|
`pinsID`, `pinsLink` and `readSurvey.pinIDs`: five seats stalled on the interning.
|
||||||
Start `replayPairs`' pin set as a clone of the earlier read's pins, deleting the
|
Start `replayPairs`' pin set as a clone of the earlier read's pins, deleting the
|
||||||
|
|||||||
Reference in New Issue
Block a user