A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
bench(net): what the interest path's C x E is actually spent on
esengine8f5bc9bbc9f8
diff --git a/bench/replication-dirty/README.md b/bench/replication-dirty/README.mdindex 4406711d1..9ded72e6e 100644--- a/bench/replication-dirty/README.md+++ b/bench/replication-dirty/README.md@@ -88,7 +88,7 @@ in change tracking at all?**It is not a per-frame switch. Enrolling is not a sample-time flag — the write taxis paid on every write once a component is tracked, whatever the sampler thendoes. So a busy frame chooses between C and B, never back to A, and-`if (dirty > x) fullScan()` recovers nothing. PR6b measured C/B at 0.95–1.04 with+`if (dirty > x) fullScan()` recovers nothing. C/B measures 0.95–1.04 witheverything dirty: having paid for tracking, candidate pruning is close to free.Read the tax against a budget as well as against the other arm. The report prints@@ -149,8 +149,8 @@ not make A the usable one. The interesting cell is 100k/1%: A at 170% of a core- The measurement phase only ever calls `world.set()`: no removal, no despawn,no churn. So this says nothing about **topology** discovery — a productionsampler still finds component removal by comparing against the shadow, and- owning a `Removed` reader per replicated component is a PR7 question, not one- these numbers answer.+ owning a `Removed` reader per replicated component is a separate question, not+ one these numbers answer.- `ReplicationServer.sample()` walks every replicated entity to find spawns anddespawns BEFORE it looks for dirty fields. That scan is not in these arms, soa near-zero sample tax here is the dirty-discovery segment vanishing, not thediff --git a/bench/replication-interest/README.md b/bench/replication-interest/README.mdindex 9b6d925bb..4730faeae 100644--- a/bench/replication-interest/README.md+++ b/bench/replication-interest/README.md@@ -1,6 +1,7 @@# Interest path decomposition-With the registry's O(E) gone (N1.5b), `sampleWithInterest_` is what is left. It+With the registry's O(E) gone — it runs on a membership journal now —+`sampleWithInterest_` is what is left. Itcosts C × E, and this measures **which of its passes spends that** — productionis untouched.@@ -50,7 +51,7 @@ Entities visited per sample, which is the mechanism without this machine in it:| A @ 100k × 32 | 3,200,000 | 3,200,000 | 3,200,000 || B @ 100k × 32 | **32** | 3,200,000 | **32** |-## What that says about N2b+## What that says about the change after this one**Half the cost at 10k, two thirds at 100k, is ownership lookup — and none of itneeds a spatial index.** An index answers it in O(owned): 3.2 million visits@@ -76,4 +77,4 @@ attack, and it is worth attacking on its own terms rather than as a side effect.is the next thing to look at — measured, not guessed.- Custom `position()` readers are why a provider cannot simply index everything:the server has no way to know when a caller's arbitrary function would return- something new. That is a design constraint for N2b, not a cost measured here.+ something new. That is a design constraint on any provider, not a cost measured here.diff --git a/bench/replication-interest/run.mjs b/bench/replication-interest/run.mjsindex 8920a662c..f6ca686f6 100644--- a/bench/replication-interest/run.mjs+++ b/bench/replication-interest/run.mjs@@ -3,11 +3,10 @@/*** @file Where the interest path's C × E actually goes.*- * Phase 1 of N2a: decomposition, not optimisation. Production is untouched —- * this reproduces `sampleWithInterest_` segment by segment so each pass can be- * timed and counted on its own, and adds ONE alternative (an ownership index)- * to price the two passes that exist only to answer "what does this connection- * own".+ * Decomposition, not optimisation: production is untouched. This reproduces+ * `sampleWithInterest_` segment by segment so each pass can be timed and counted+ * on its own, and adds ONE alternative — an ownership index — to price the two+ * passes that exist only to answer "what does this connection own".** node bench/replication-interest/run.mjs* node bench/replication-interest/run.mjs --quickdiff --git a/bench/replication-topology/README.md b/bench/replication-topology/README.mdindex f8f8f7621..128887715 100644--- a/bench/replication-topology/README.md+++ b/bench/replication-topology/README.md@@ -2,8 +2,8 @@`reconcileRegistry_()` reads every replicated entity and walks the wholeregistry, **every sample, whether or not anything entered or left replication**.-With dirty-field discovery now down to candidates (PR7), that scan is what is-left of the O(E) in `sample()`.+With dirty-field discovery now down to candidates, that scan is what is left of+the O(E) in `sample()`.This directory measures whether a **topology journal** removes it, and shipsnothing: production still runs the full reconcile.@@ -21,7 +21,8 @@ nothing: production still runs the full reconcile.It records one thing: *this entity's membership in this component moved at tickT*. Not what moved, and not in which direction.-That is deliberate, and it is the same rule PR7 established one layer down:+That is deliberate, and it is the same rule the field collector follows one+layer down:```field replication: history selects candidates, shadow × world decides truth