Record the chain-depth measurement and the question it opens
This commit is contained in:
1 parent
836c222f0c
commit
e90b026969
1 file changed
+17
@@ -25,6 +25,23 @@ The invariant the chain rests on: `resolved = region + resolve(slot)`, so
|
|||||||
anything that rewrites a region owes that slot a zero. `mov` does it for the
|
anything that rewrites a region owes that slot a zero. `mov` does it for the
|
||||||
subtree it rewrites and `draw_inner` for the widget it draws.
|
subtree it rewrites and `draw_inner` for the widget it draws.
|
||||||
|
|
||||||
|
**Waiting on the owner, and measured first.** `tests/chain_cost.rs` times the
|
||||||
|
pass on the GPU with timestamp queries: at 200,000 instances the walk is free
|
||||||
|
to about depth 8 (+5%) and then costs roughly 3 us per level -- +43% at 16,
|
||||||
|
+221% at 64. Each step is a storage load addressed by the previous one, so it
|
||||||
|
is the chaining that costs and not the arithmetic at a level; a slot carrying
|
||||||
|
a whole region would measure the same. Since #18 gives every active widget a
|
||||||
|
slot, a primitive resolves through its full tree depth, which LAYOUT.md notes
|
||||||
|
has exceeded 16. Irrelevant at an example's couple of hundred primitives,
|
||||||
|
squarely in that regime for a transcript's glyphs.
|
||||||
|
|
||||||
|
So the open question is how to keep the chain shallow -- a slot only where
|
||||||
|
something is actually moved (needs re-parenting when an intermediate ancestor
|
||||||
|
later gains one), against §6's rejected flattening, which the number partly
|
||||||
|
rehabilitates. Retiring `Remap` by way of region chaining is cheap on top of a
|
||||||
|
shallow chain and expensive without one. Put to her on #18; do not act before
|
||||||
|
she picks.
|
||||||
|
|
||||||
Check for a review before starting anything, and read the newest
|
Check for a review before starting anything, and read the newest
|
||||||
`submitted_at` rather than the first result:
|
`submitted_at` rather than the first result:
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user