Files
Fr0zkaandClaude Opus 5.5 a176d0743a wip(assembler): round L14 -- far-LOD cost counted; no exact-output lever above 3% (opt-in counters)
Plain W12 far work: LOD6 2.59, LOD8 2.05, LOD4 1.57, LOD5 1.41, LOD7 1.16 worker-s. Ground/cap
refinement ~3.95 worker-s and LOD6 connector repair 1.40 worker-s (82% uncached formula calls)
build visible geometry; no bit-identical reduction proved. Adds opt-in far-shell column counters
(reviewed: no cost when off, interleaved 1.429 vs 1.419 s). All hashes, the crossing hash and route
parity are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CSFYgsdW8ejZSyiMf4qRSX
2026-10-20 02:33:48 +02:00

10 KiB
Raw Permalink Blame History

Linux14 — far spawn work

No mesh or density code changed. The source changes add opt-in profiling for far-shell column lookups; counter snapshots are behind the existing profile guard, with no added timing or counter increments when profiling is off. The final plain build has the same output as L13.

Far LOD cost and ranking

The first table is from five interleaved, W12, hashing-off pairs: L13 binary before and L14 binary after. Values are median worker-sums across that LOD; per-tile time is the L14 median divided by tile count. The ranking is L6, L8, L4, L5, L7 on both binaries.

LOD Tiles L13 → L14 median worker-s (s) L14 worker-ms/tile
4 320 1.600 → 1.572 4.91
5 144 1.421 → 1.411 9.80
6 96 2.624 → 2.585 26.93
7 48 1.152 → 1.158 24.13
8 153 2.044 → 2.046 13.37

Phase detail below is one W12 --profile-lod-work run on the final Clang binary. Cache counters include all column work for that LOD, not just refinement. A “shared hit” is a hit from the world-shared cache; formula evaluations equal local misses minus shared hits.

LOD Calls Local hits / misses Shared hits Formula evaluations (per tile) Column compute (ms) MC non-column (ms) Ground/cap non-column (ms) Connector shell non-column (ms) Skirt (ms) Assembly (ms)
4 1,845,787 1,579,868 / 265,919 175,805 90,114 (282) 521 472 385 0 186 3
5 877,542 701,124 / 176,418 105,477 70,941 (493) 408 135 705 0 159 2
6 760,952 418,443 / 342,509 63,209 279,300 (2,909) 1,594 90 474 210 158 2
7 337,328 257,969 / 79,359 8,878 70,481 (1,468) 395 59 514 0 145 4
8 644,565 508,799 / 135,766 29,545 106,221 (694) 608 374 783 0 278 6

MC and refinement column-compute / non-column times (ms) were L4 221/472 MC and 281/385 ground/cap; L5 199/135 MC and 209/705 ground/cap; L6 196/90 MC and 205/474 ground/cap; L7 184/59 MC and 211/514 ground/cap; L8 413/374 MC and 195/783 ground/cap. The column compute column overlaps those column portions. Timers are worker sums and may differ by a few ms from their subphase sums.

Stratum shells made zero field calls at LOD4–8 and took under 0.03 ms total. The profiler run measured about 1.408 s whole-view-ready; the unprofiled interleaved runs below are the timing result.

Connector-shell repair

AppendFarConnectorShells is guarded to LOD6 and above. Coarse marching cubes can leave gaps in a route connector wall, so the repair checks four axial rays at connector stations and adds only the panels where the nearest coarse-mesh hit misses the source-field radius tolerance. LOD6 checks at 128-voxel stations; LOD7–8 use 256-voxel stations. Only LOD6 had repair candidates in this spawn view: 5,066 triangles were added. The shell took 1.403 worker-s, including 1.193 s of column evaluation (about 0.210 s shell work outside those evaluations).

The LOD6 repair made 251,475 source/column calls: 44,596 worker-local hits, 206,879 local misses, 30 shared-cache hits, and 206,849 formula evaluations. Thus 82.3% of calls evaluated a formula; the work is mostly uncached. A cache miss can include a point evicted by the four-way worker cache, so these counters do not prove every evaluated XY is unique. The L13-bound base evaluator already feeds the shared exact-XY cache; neighboring LOD samples mostly use different XY coordinates, and only 30 repair samples hit the shared cache. Reducing stations or rays would change the repair geometry, and no bit-identical reduction was proved.

Ground and cap refinement

Ground refinement starts at LOD5 (32-voxel grid there, 64 at LOD6, then 128 at LOD7–8). Cap refinement starts at LOD4 (16-voxel grid there, then 128 at LOD5–7; LOD8 may use its configured interior override). Both query exact Heightfield2D columns and use those values for heights, normals, materials, clipping, and replacing nearby coarse faces. The existing shared cache is keyed by recipe/plan and exact XY, so aligned samples can already be reused across tiles and levels. The LOD-wide shared-hit counts are in the table above; they are not refinement-only counts.

Current safe skips are the plan Z-range check for ground and the cap-height-bound check for caps. No additional tile/cell skip was shown to preserve every sample that affects output; a grid point can also supply a neighboring normal or clipped cell. No new refinement sharing or skip was built.

Ranked exact-output work

No exact-output change with a measured saving above 3% was proved, so no geometry optimization was built. The ranked work buckets are:

  1. Ground/cap refinement across LOD4–8: about 3.95 worker-s including its column work. Removing all of it would be an unrealistic idealized 23% of 1.419 s at 12-way division; the sampled values currently affect geometry/materials/normals.
  2. LOD6 connector repair: 1.403 worker-s inclusive, an idealized upper bound near 8.2% at 12-way division. Most calls are uncached, and the missing panels are required for the current mesh.
  3. Far-LOD column formula work: 3.53 worker-s across LOD4–8, overlapping the two buckets above. Exact-XY sharing is already active; no redundant set large enough to remove was demonstrated.
  4. Marching-cubes non-column work is 1.13 worker-s and skirts 0.93 worker-s. Assembly is only 0.017 worker-s; stratum shells are negligible. No exact reduction was established.

These idealized conversions divide worker-s by 12 and are not predicted wall-time gains. The L6 screen-space gate was not used because this round made no geometry change.

Interleaved cost, builds, and hashes

Five hashing-off W12 pairs ran in one session, alternating Standalone/bin/linux/VoxelForgeCoreHeadless-linux13-clang and Standalone/bin/linux/VoxelForgeCoreHeadless-linux14-clang. Every run generated 2,553 tiles at seed 0 and camera 0,-35,-487.94,0,-22.

Pair L13 whole-view-ready (s) L14 whole-view-ready (s)
1 1.416 1.410
2 1.436 1.388
3 1.416 1.424
4 1.429 1.419
5 1.430 1.426

Median was 1.429 s before and 1.419 s after (−0.7%, within this run spread). The telemetry is opt-in; the plain run shows no measurable cost when off.

Final binaries Standalone/bin/linux/VoxelForgeCoreHeadless-linux14-clang and Standalone/bin/linux/VoxelForgeCoreHeadless-linux14-gcc were rebuilt with Standalone/BuildLinux.sh, -j12, CPUs 0–11, and a 6 GiB address-space cap: Clang 19 with FP contraction off and GCC 14 with default contraction. Builds passed. Runtime peak RSS was 926,520 KiB; largest individual build-process RSS was 901,968 KiB (GCC), with a 4,557,196 KiB process-group peak. Governor remained powersave.

The final hash matrix passed 28/28: SurfaceWorld seed 0 and FloatingIslands seed 0, Clang/GCC, W1/W8/W12, with five W12 repeats per recipe/compiler. Full-detail, whole-view, all nine per-LOD, and exact-query rows match L13 exactly. Route parity also passed for SurfaceWorld seeds 0, 1, and 17 and FloatingIslands seed 0: page/native-only routes, edits, history, higher-LOD exact queries, and proof checks had zero mismatches. The final 24 m crossing hash matched at W1/W12 on both compilers: 0x337ca62131576728 / 0x7612f48e2ddbbaab / 0x69a67ed4add83b87 / 0xf11ac1ebd0f7ddb8 (density/mesh/payload/topology).

Recipe Full-detail D/M/P/T Whole-view D/M/P/T Exact density / unclamped / detail / collision
SurfaceWorld 0x0ee0579bd15cbbe4 / 0x32e5d4964d610fee / 0x1932b96ee4b1d910 / 0x69743c6bad3447dc 0xc10697a8f48380c7 / 0xe75c9119a1498cd5 / 0x49a9a8d1835a6c8c / 0xedcb23288b5e8724 0xe4d4a8eb95b35933 / 0xe4d4a8eb95b35933 / 0xefcba20c0c70c415 / 0xe604823a249029bf
FloatingIslands 0x6d842d2878b08ef6 / 0x4b868a3184f08035 / 0x2cedf2236788752d / 0xeac17d5e0cb5044a 0x5be4d8cde79b2a76 / 0x96f75041f6861b3a / 0x3700a516cc89d50c / 0x6b99948d6eab4f21 0x61daded9c303becb / 0x61daded9c303becb / 0xefcba20c0c70c415 / 0x84d37463be9b0573

Hash logs and the 28-row comparator are in Saved/Linux/l14-final-hash-*.log and Saved/Linux/l14-final-hash-audit.txt. Final route logs are Saved/Linux/l14-final-route-*.log; crossing and pair logs use the l14-final-crossing-* and l14-final-cost-* names.

Failed or retried runs

  • The first SurfaceWorld hash matrix and first crossing checks omitted the spawn camera and used the headless origin. Their comparisons differed from L13; all 14 SurfaceWorld configurations and all four crossing configurations were rerun with the spawn camera and passed. FloatingIslands used its auto-surface camera and matched on the first run.
  • The first route probes also used the wrong camera selection. A later seed-1 probe used the fixed seed-0 camera, exited 9 on two LOD2 exact-query checks, and was rerun with --auto-surface-camera; the corrected seed-1 and seed-17 audits passed. The origin-camera route probes returned success but were not used as reference results.
  • Clang was rebuilt after the connector counters were added and again after folding aggregation into the existing opt-in guard. Both Clang builds and the final GCC build succeeded. No run hit the RSS, 15-minute stuck-step, or 30-minute limits.

Owner note: the highest measured far cost is still LOD6 connector repair, but its formula work is mostly uncached and its panels preserve the coarse route wall. The final interleaved plain runs show no measurable diagnostic overhead; no geometry change or L6 budget claim is made.

Orchestrator review (Claude)

  • Accepted as a counting round. Interleaved W12, no hashing: L13 1.429 s vs L14 1.419 s median, so the opt-in counters cost nothing measurable when off; committed with the report.
  • Conclusion: exact-output far work has no remaining lever above 3%. The big buckets (ground/cap refinement ~3.95 worker-s, LOD6 connector repair ~1.40 worker-s) produce visible geometry. Further far savings need geometry changes, judged against today's same-LOD mesh within the owner's budget (1 px at 1440p, at the LOD's closest display distance, display only).