Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
66 lines
14 KiB
Markdown
66 lines
14 KiB
Markdown
# R28 — revised report
|
||
|
||
I withdraw the earlier claim that the motif/profile timing gap identifies a code-path cost. The runs are not comparable, and the logged stage timings are not a complete additive breakdown of wall time.
|
||
|
||
## Cost ledger
|
||
|
||
Worker sums are **CPU seconds across workers**, not wall seconds. The LOD sums below are derived by adding the indicated per-LOD log rows. The per-tile figure is their total divided by the run’s tile count; it is a workload average, **not** isolated dispatch overhead.
|
||
|
||
| Generator | Whole-view wall time | Shape stage: total (local; intervals/signs; surface band; far parents), ms | LOD worker-s: 0–1 / 2–3 / 4–8 | Average worker time per tile |
|
||
|---|---|---|---|---|
|
||
| Natural SurfaceWorld | 1.786 s in a raw paired run ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/cost-surface-world-pair1-baseline.log:83>)); separate instrumented static run: 1.590 s ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9565>)) | 403.838 (35.042; 76.196; 235.239; 50.008) ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:66>)) | 3.472580 / 1.965454 / 7.878235 s, derived from [LOD 0](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9556>), [1](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9557>), [2](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9558>), [3](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9559>), [4](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9560>), [5](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9561>), [6](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9562>), [7](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9563>), [8](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9564>) | 5.62 ms/tile, derived: 13.316269 worker-s ÷ 2,370 tiles ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9565>)) |
|
||
| flatField profile | 1.330 s ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:41>)) | 432.380 (35.708; 77.840; 243.355; 67.675) ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:33>)) | 3.757256 / 1.936127 / 4.675822 s, derived from [LOD 0](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:42>), [1](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:43>), [2](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:44>), [3](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:45>), [4](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:46>), [5](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:47>), [6](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:48>), [7](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:49>), [8](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:50>) | 4.66 ms/tile, derived: 10.369205 worker-s ÷ 2,226 tiles ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:21>)) |
|
||
| Caves | 0.706 s ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l54/caves-speed-clang-w12.log:89>)); the L54 report records 0.727 s ([report](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux54/REPORT.md:37>)) | 60.375 (27.537; 13.054; 19.202; 0) ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l54/caves-speed-clang-w12.log:66>)) | 5.773526 / not run / not run; LOD 0 only ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l54/caves-speed-clang-w12.log:80>)) | 7.92 ms/tile, derived: 5.773526 worker-s ÷ 729 tiles ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l54/caves-speed-clang-w12.log:74>)) |
|
||
| Motifs | 0.524 s ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l56/motif-slice1-cold-view-clang.log:44>)) | 45.207 (27.253; 14.085; 3.510; 0) ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l56/motif-slice1-cold-view-clang.log:36>)) | 4.888551 / not run / not run; LOD 0 only ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l56/motif-slice1-cold-view-clang.log:1418>)) | 14.25 ms/tile, derived: 4.888551 worker-s ÷ 343 tiles ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l56/motif-slice1-cold-view-clang.log:25>)) |
|
||
| Lattice | 1.647 s ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l58/lattice-speed-clang-w12.log:89>)); the L58 report records 1.694 s ([report](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux58/REPORT.md:19>)) | 136.529 (61.169; 35.675; 38.559; 0) ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l58/lattice-speed-clang-w12.log:66>)) | 17.254969 / not run / not run; LOD 0 only ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l58/lattice-speed-clang-w12.log:80>)) | 23.67 ms/tile, derived: 17.254969 worker-s ÷ 729 tiles ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l58/lattice-speed-clang-w12.log:55>)) |
|
||
| Floating Islands | 5.028 s paired median ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l57/verify-full-passagefix.log:1164>)); older diagnostic run: 4.899 s ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/fi.log:79>)) | 444.665 (36.714; 85.436; 262.287; 52.390) ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/fi.log:71>)) | 32.535211 / 3.989240 / 13.653194 s, derived from [LOD 0](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/fi.log:9561>), [1](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/fi.log:9562>), [2](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/fi.log:9563>), [3](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/fi.log:9564>), [4](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/fi.log:9565>), [5](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/fi.log:9566>), [6](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/fi.log:9567>), [7](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/fi.log:9568>), [8](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/fi.log:9569>) | 21.17 ms/tile, derived: 50.177645 worker-s ÷ 2,370 tiles ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/fi.log:9570>)) |
|
||
|
||
“Not run” means those LODs were excluded by the fixture configuration, not that their cost was zero. Shape component values are the logged bins; their sums do not exactly equal the logged ShapeStage total. No separate fixed per-tile dispatch cost is isolated. The average worker time per tile includes density evaluation, grid work, skirts/refinement and mesh assembly.
|
||
|
||
The far-LOD work is visible in the SurfaceWorld LOD rows: LOD4–8 account for **7.878235 worker-s**, derived above. In those rows, column evaluation totals **2.699576 worker-ms**, cap refinement **870.358 worker-ms**, and skirts **789.370 worker-ms**, derived from the [LOD4](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9560>) through [LOD8](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l55/timeline-static/sw.log:9564>) counters. Connectors are not reported as a separate counter. This is CPU work, not wall time.
|
||
|
||
Every run pays some owner-data loading, plan/layout resolution, shape setup and per-requested-tile scheduling/meshing. The directly logged preflight is only a few to tens of milliseconds here—for example, owner-data load is 5.193 ms and plan timing 10.991 ms for flatField ([log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:4>), [log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:20>)). Shape setup is not a universal fixed half-second: it ranges from 45 ms in the restricted motif run to roughly 404–445 ms in the full SurfaceWorld/FI diagnostics. Far LODs are not paid when a fixture requests only LOD0.
|
||
|
||
## Motifs versus flatField profiles
|
||
|
||
The **2.54×** headline ratio is derived from `1.330 ÷ 0.524`; it does not isolate field cost.
|
||
|
||
Both fixtures set `surface_profile_override.kind` to `flatField` ([flatField fixture](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/fixtures/style-override-profile-flatField.json:29320>), [motif fixture](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l56/fixtures/style-override-motifs-slice1.json:29320>)). Both logs use the `SurfaceWorld` recipe, the same worker count, clip radius and zero camera step. They also report the same stratum range and passage: strate 1, chunks −16…−79, route points 33, and passage `passage/0-1/0`, segments 153…1790 with the same vertical span. Both report no Floating Islands stratum ([flatField log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l53/profile-cold-view-flatField-clang.log:15>), [motif log](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/l56/motif-slice1-cold-view-clang.log:19>)).
|
||
|
||
They are **not the same view**. The flatField log requests LOD0–8 and reports 2,226 tiles; the motif log forces max level 0 and reports 343 tiles. The motif run also has `render_distance_override=yes`, versus `no` for flatField. Both HeadlessConfig lines say `camera_step_m=(0,0,0)`, but neither records the absolute starting camera. The motif fixture adds two SDF records. These differences prevent attributing the timing ratio to code path or terrain.
|
||
|
||
The code confirms there is no cheaper motif base-field branch. Both resolve through the `SurfaceWorld` adapter to `Heightfield2D`; [the adapter](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:49>) wraps that evaluator, and [native SurfaceWorld dispatch](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:6257>) selects it. `Heightfield2D::point` uses the cached column and computes the density from ground and cap heights ([source](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/WorldAssemblerInternal.h:2576>)).
|
||
|
||
The flatField specialization is actually cheaper per height sample than a patterned profile: it skips the cosine calculations:
|
||
|
||
```cpp
|
||
std::int64_t relief = 0;
|
||
if (profile.kind != WorldAssemblySurfaceProfileKindV1::flatField)
|
||
{
|
||
// cosine-based relief calculation
|
||
}
|
||
```
|
||
|
||
([source](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/WorldAssemblerInternal.h:1830>))
|
||
|
||
Motifs add a bounded stamp overlay after the base density ([call site](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:1838>), [stamp bounds and candidates](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:6877>)). Caves use a different adapter for constant host rock before cavern composition ([source](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:137>)); that is not the motif path. So the logs show a shared SurfaceWorld base with extra motif work, not a primitive motif shortcut.
|
||
|
||
## Shared plan, ranked by measured work
|
||
|
||
The fact-card targets imply required wall reductions of **0.78 s** for Natural SurfaceWorld (`1.78 − 1`), **0.33 s** for flatField (`1.33 − 1`), and **0.69 s** for Lattice (`1.69 − 1`). These are derived target gaps, not predicted savings. Caves and motifs are already below one second in their restricted LOD0 runs; that does not establish their full-view times.
|
||
|
||
1. **Reduce far-LOD grid, cap and skirt work.** The measured SurfaceWorld LOD4–8 pool is 7.878235 worker-s; flatField’s is 4.675822 worker-s. That is the largest shared measured pool for the full-view heightfield runs. It is an opportunity estimate, not an achievable gain. Keep exact density, mesh and seam checks. Falsify the optimization if per-LOD work falls but matched whole-view wall time does not improve, or if far connectors, caps or skirts fail geometry checks.
|
||
|
||
2. **Reduce or reuse cold shape setup.** Full-view diagnostics show about 0.404 s for SurfaceWorld, 0.432 s for flatField and 0.445 s for FI. This offers a broad but limited ceiling; no saved result shows how much can safely be removed. Falsify it if the ShapeStage time drops without lowering matched cold whole-view time, or if reuse changes route/passage outputs.
|
||
|
||
3. **Specialize the shared heightfield/grid work.** SurfaceWorld LOD0–1 used 3.472580 worker-s; the flatField run used 3.757256 worker-s across LOD0–1. The Lattice fixture used 17.254969 worker-s at LOD0, but requested no far LODs. A common optimization may help profiles and Natural SurfaceWorld, but the Lattice sample cannot justify transferring a far-LOD technique. Falsify it if field/grid counters and worker time do not fall on a matched view, or if canonical hashes and surface/passage audits change.
|
||
|
||
4. **Keep Caves and Motifs as regression cases until their views match.** Their existing 0.706 s and 0.524 s logs cover 729 and 343 LOD0 tiles respectively. A same-view rerun is needed before claiming either is already near one second on the 2,370-tile workload.
|
||
|
||
Before judging gains, rerun the generators with the same tile keys, LOD counts, camera, hash setting and passage/FI structure. The current logs fail that comparability check. The reference image is unavailable here, so visual fidelity cannot be checked in this report.
|
||
|
||
## What remains unknown
|
||
|
||
The logs do not isolate fixed dispatch cost per tile, do not consistently expose field/column counters, and do not provide a same-view Motif/Profile comparison. Several headline values also come from different measurement series: for example, the Caves speed log says 0.706 s while its report says 0.727 s; Lattice says 1.647 s in the speed log and 1.694 s in its report. I have kept those distinctions rather than treating them as one measurement.
|
||
|
||
I did not change the tree or run scripts, tests, builds or binaries. |