unreal: tile generation at BackgroundLow priority (L97); FI arrival world-tick max 93 -> 21 ms

The 50-90 ms UWorld::Tick spikes were the TG_EndPhysics barrier waiting for physics-scene
completion while all 8 TaskGraph workers ran BackgroundHigh tile tasks. Near and horizon tile
generation now run at ETaskPriority::BackgroundLow (helper lanes background); queue depth and
the 8 workers are kept. FI: near set 2.11 s (10 runs), max UWorld::Tick 21 ms, max
EndPhysics->PostPhysics gap 16 ms; SW: 1.32 s, 11 ms. A hard 7-task cap removed spikes but
doubled settle time. World unchanged. Fast tier PASS; Linux UE host builds.
R44 notes (exact passage restructuring: only a full-composer z-column SIMD kernel could
plausibly reach 3x; smaller exact pieces ~1.1-1.2x each) attached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-28 12:03:52 +01:00
1 parent 94f9aa6790
commit 9d9504ae4e
4 files changed
+600 -14

No files matched your search

@@ -0,0 +1,35 @@
## Ranked findings
**[INFERENCE] No measured result establishes an exact 3× speed-up. The plausible route is a z-column evaluator that combines prepared segment data, full-reach candidate dispatch, and bit-preserving SIMD across lanes.** Current code offers exact work to reuse within a column, but the 3× target requires accelerating most of the composition work. Falsifier for this route: an implementation either differs on any per-sample output bit or fails to reach 3× with its build and fallback costs included.
**[MEASURED]** At W12, L88 reports passage-on versus passage-off readiness of 2.273−0.812 = **1.461 s for FI**, and 2.253−0.851 = **1.402 s for TN**. A 3× cut would put the passage work at about 0.487/0.467 s and imply roughly 1.299/1.318 s total readiness, before added setup cost. The ablation intentionally fails route walkability, so those totals are projections, not valid finished-world targets. [Linux88 report:10](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux88/REPORT.md:10) [Linux88 report:14](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux88/REPORT.md:14). Falsifier: a replay using the same W12 protocol produces different medians or ablation behavior.
1. **[INFERENCE] Exact z-column SIMD across the complete composer — highest potential; large effort; 3× is possible in principle, unmeasured.** In the carve callback, fixed segment data costs 9 of the 34 basic floating-point operations: 3 subtractions, 3 multiplies, 2 adds for `lengthSq`, and one radius-delta subtraction. For a fixed XY column, the projection’s XY numerator costs another 5 operations per segment; sharing it across an eight-sample run saves 35 operations over those eight lanes. That is **13.4/34, or 39% of the basic operation count per lane on average**. The 34 count excludes branches, loads, optional Catmull–Rom work, and the separate player-capsule path. The code computes clamped `t` independently at each Z, then updates the center, radius, distance, and stable `(scanPhase,index)` tie-break; four scan phases feed that callback. [Carve callback and tie-break](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:1800) [Projection and clamp](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:1815) [Distance and tie-break](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:1865) [Four search phases](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:1880).
**[CODE]** The XY numerator can be reused exactly if it keeps the original operation grouping. The clamped projection, winning segment, reach check, and final composition cannot be reused as a column-wide value: each lane’s Z and evolving `composed` value matter. The current z-run path batches base-field work in groups of up to eight, while composition still appears at scalar call sites. [Z-run batching](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:12834) [Scalar composition call](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:7223). Falsifier: changing the operation grouping, lane casts, division, square root, or tie resolution changes any lane’s output bits.
**[MEASURED → INFERENCE]** L83’s PC attribution puts carve distance at 41.5% FI / 39.2% TN of passage-plus-support samples, support at 18.2% / 17.5%, and relief at 21.3% / 23.7%. A 4× kernel needs to cover at least 88.9% of total work to achieve 3× by itself; the profiler shares are sample attribution, not wall-time timers. The counted carve arithmetic alone does not cover that share, so this approach needs to speed up candidate traversal, relief, and support as well. [L83 FI attribution](/home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l83/census/analysis.json:219) [L83 TN attribution](/home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l83/census/analysis.json:316). Falsifier: end-to-end profiling shows the accelerated kernel covers too little time, or the cold W12 result misses 3×.
2. **[INFERENCE] Full-reach prepared lists with flat, ordered evaluation — theoretical ceiling about 1.35× from traversal removal alone; large effort; possible regression.** L83 assigns the recursive nearest-node and potential-within symbols 9,097 of 33,687 FI passage-plus-support ticks (27.0%) and 8,456 of 32,728 TN ticks (25.8%). Erasing all that attributed time with zero replacement cost gives optimistic ceilings of **1.37× FI / 1.35× TN**; a flat loop still evaluates candidates, so actual gain would be lower. [L83 FI symbols](/home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l83/census/analysis.json:239) [L83 TN symbols](/home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l83/census/analysis.json:337). Falsifier: an implementation’s measured traversal time is too small to support that ceiling, or candidate evaluation costs exceed the removed traversal cost.
**[MEASURED]** L90’s 10 m census has active carve p90 13, tread p90 4, and clearance p90 2; weighted fallback is 18.28%, all from the reach limit. It emitted 54,324 bricks and about 12.1 MiB of references, but it is census instrumentation, not a production evaluator, and no full-reach list counts exist. [L90 distributions](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux90/REPORT.md:7) [L90 fallback](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux90/REPORT.md:14) [L90 status](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux90/REPORT.md:31). Falsifier: a full-reach census shows low candidate counts and negligible fallback cost—or, in the other direction, shows list inflation erases traversal savings.
**[CODE/INFERENCE]** Full reach matters: at 0.25 m per voxel, the source-aware rule `−source·Q + 0.24 m` reaches **32.24 m** for a −128-voxel input. A fixed candidate superset could also evaluate segments the current dynamic-best BVH prunes. The current node bounds use endpoint AABBs, while the callback can replace the chord center with a Catmull–Rom value; preserving output therefore requires proving extra candidates harmless or retaining equivalent per-lane pruning behavior. [Reach rule](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:1316) [Endpoint bounds](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:5313) [Catmull–Rom callback](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:1839). Falsifier: a bitwise comparison shows that the flat list changes a winner or any later composed density.
3. **[INFERENCE] Prepared segment constants and per-column XY terms — likely modest, roughly 1.18–1.20× under a generous linear-time model; low-to-medium effort.** The 9 static and 5 shared operations above are 39% of the counted carve operations. Applying that proportion directly to L83’s carve attribution yields an optimistic total-work estimate of about 1.20× FI / 1.18× TN. This assumes operation-count savings translate proportionally into time; the logs do not establish that. Current passage constants cover passage-level metadata, not these segment values. [Carve operation order](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:1807) [Passage constants](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:5521). Falsifier: exact replay shows bit changes, or timings show no gain after build cost. Keep the existing division and expression order; reciprocal substitution or algebraic rewrites can round differently.
4. **[INFERENCE] Share relief interpolation within same-cell z-runs — likely around 1.10× at best under a generous model; medium effort.** Each noise octave performs seven lerps, so wall relief performs 21. In an eight-lane run whose three octave cells stay fixed, broad and mid relief can share six and four intermediate lerps respectively for lanes 2–8: 70 of 168 lerps saved, or 41.7%. The existing cache already reuses lattice corners, but still does per-sample coordinate, hash/key, fade, and interpolation work. [Cached-noise behavior](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/VoxelForgeFieldShared.h:257) [Three wall-relief octaves](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/VoxelForgeFieldShared.h:394). L83 assigns 21.3% FI / 23.7% TN to remaining relief; even the 41.7% lerp reduction maps to only about 1.10× / 1.11× if time scales linearly, and actual gain should be smaller because not all relief work is those lerps. Falsifier: same-cell lanes differ bitwise, or profiling shows cell/hash work dominates and the shared interpolation barely changes time.
5. **[INFERENCE] Reuse support, tread, clearance, and mouth XY work per column — small standalone gain, medium effort.** The support projection and horizontal capsule projection can be shared for fixed XY and a fixed segment, but support ownership can change with Z; vertical capsule distance, density gates, and deferred support still vary per lane. [Support projection](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:2210) [Support and clearance ordering](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:2524). L83 attributes 18.2% FI / 17.5% TN of passage-plus-support samples to the support phase, an absolute upper bound of 1.22× / 1.21× if that whole phase vanished; XY reuse covers only part of it. L88 records about 0.97 / 0.99 support visits per passage iteration, while L90’s active tread and clearance p90s are 4 and 2. [Support-phase shares](/home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l83/census/analysis.json:208) [L88 support counters](/home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l88/ceiling-split/profile-summary.json:20) [L90 semantic counts](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux90/REPORT.md:9). Falsifier: exact per-lane support/capsule comparisons fail at helix overlaps, mouths, or bridges, or the reused XY work is too small to move total time.
6. **[INFERENCE] Per-brick mouth/support memoization and true-composed identity proofs — useful as an add-on; no defensible speed estimate yet.** Reuse XY terms and candidate dispatch, not final decisions that depend on Z or evolving `composed`. Existing code already has tile feature flags and density-aware reach checks; a stronger brick proof must cover every lane and prior passage update. [Tile and column guards](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:1651) [Sequential support restoration](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:2583). L83’s direct `PassageMayAffectDensity` symbol is only 1.09% FI / 0.76% TN of passage samples, while the logs provide no count of whole bricks that a new composed-bound proof could skip. [L83 FI proof symbol](/home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l83/census/analysis.json:275) [L83 TN proof symbol](/home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l83/census/analysis.json:372). Falsifier: counters show few proven skips or the proof misses a lane whose output changes.
## Builder brief for the top route
- **[INFERENCE] Goal:** Build a full-composer z-column kernel using prepared segment data, per-run candidate unions, and SIMD lanes; include carve, relief, support, tread, mouth, and clearance costs. Include build and fallback time in the cold result. Falsifier: the kernel accelerates carve alone while total cold passage time remains below a 3× improvement.
- **[CODE] Invariants:** Preserve each lane’s sample-coordinate casts, clamped `t`, divide/square-root behavior, Catmull expression, four scan phases, `(scanPhase,index)` tie-break, passage order, source-dependent reach, `std::lerp` and min/max ordering, support deferral, and mouth restoration. Do not cap lists; retain exact fallback for any lane outside the proven set. [Carve and tie rules](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:1815) [Final carve blend](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:2163) [Deferred support](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:2575). Falsifier: any per-sample density bit differs from the current scalar path.
- **[INFERENCE] Evidence bar:** Compare every sampled density bit and the density/mesh/payload/topology hashes on FI/TN LOD0–2. On the same cold W12 protocol, show at least 3× lower passage time with setup and fallback included; report candidate distributions, fallback time, and per-phase wall time. Falsifier: any parity mismatch, or a speed ratio below 3×.
**[MEASURED]** The 4-voxel trilinear cache regressed readiness in L88, L91 reports source floors changed samples and meshes, and L93’s R=4 m reach changed normals by up to 53.193°. Those remain outside the exact-restructuring ranking. [L88 cache result](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux88/REPORT.md:27) [L91 floor result](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux91/REPORT.md:9) [L93 reach result](/home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux93/REPORT.md:20). Falsifier: a remeasurement shows those reported output changes or regressions were recorded incorrectly.
**[CODE]** This was read-only research; I ran no project code, builds, tests, or benchmarks.