Files
Fr0zkaandClaude Opus 5.5 90378a585f profile: per-term legacy FI/TN sample profiler (L76); passage/support is ~75% of field time
Opt-in at build time (VOXELFORGE_PROFILE_LEGACY_TERMS=1; compiled out by default, ~2% when on).
Per legacy sample: passage/support composer ~1.05 us vs primitive scan ~0.19 us, boundary
band ~0.06 us, noise ~0.01 us. Resolved-passage constants are cached at field binding
(arithmetic order unchanged); whole-view effect within noise. Per-tile hashes identical to L75
in all 24 compiler x worker x view comparisons; fast tier PASS; Linux UE host builds.
R40 researcher notes attached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
2026-10-27 16:25:19 +01:00

6.5 KiB
Raw Permalink Blame History

Linux76 report: legacy FI/TN sample cost

Per-term profile

The term profiler sampled 1 in 256 density points and scaled timed calls by their observed counts. Worker-ms are summed across LODs; ns/sample divides by legacy FI/TN field evaluations. These are sampled estimates, not wall time. Before is L75; after is the final constants-only source.

Term FI worker-ms / ns per sample, before → after TN worker-ms / ns per sample, before → after
Primitive scan 1,116 / 186 → 1,133 / 189 997 / 179 → 1,037 / 186
DetailNoise call (pre-noise fade excluded) 38 / 6.4 → 39 / 6.5 63 / 11.3 → 68 / 12.2
↳ Surface relief noise, inside detail 7.6 / 1.3 → 7.7 / 1.3 12.3 / 2.2 → 13.2 / 2.4
↳ Owner noise and warp, inside detail 26.2 / 4.4 → 26.9 / 4.5 43.2 / 7.8 → 46.7 / 8.4
Composer cavern 142 / 23.6 → 145 / 24.1 122 / 21.8 → 127 / 22.8
Composer boundary band 338 / 56.3 → 350 / 58.2 306 / 55.0 → 321 / 57.8
Composer passage/support 6,462 / 1,076 → 6,323 / 1,053 5,475 / 984 → 5,522 / 993
Composer stamps 0 / 0 → 0 / 0 0 / 0 → 0 / 0
Edit brushes 133 / 22.1 → 135 / 22.5 114 / 20.5 → 119 / 21.3
Smooth-min across legacy evaluation 166 / 27.6 → 170 / 28.3 143 / 25.6 → 151 / 27.2

FI used 6,005,989 legacy samples and TN 5,562,334. The primitive bins supplied 2.75 FI / 3.85 TN candidate references per sample; only 0.251 / 0.237 per sample reached primitive-distance evaluation. The code scans references in the selected 3D bin, not the full primitive set. Smooth-min ran about 1.27 times per legacy sample and overlaps the primitive/composer rows; do not add it again. The noise subrows are inside DetailNoise. Its timer excludes the preceding fade and layer lookup. Surface relief evaluates 3D value-noise wavelengths 32, 16, and 4; noise timers cover helper calls, not individual octave loops.

Passage/support dominates: about 1.05–1.08 μs per sample versus 0.18–0.19 μs for primitive scan. Per-tile filtering of the upper-mouth scan matched hashes but regressed TN by 5.43% in the first whole-view timing set, so it was removed. Broad per-tile passage-loop filtering failed hashes and was rejected. The remaining relief-call counter includes path-relief calls and does not establish repeated triplets for the same sample; no sample cache was shipped.

The profiler adds about 1.9% on FI and 2.1% on TN by the median of three paired W8 runs against the same clean build. Pair deltas were FI +1.90%, −3.33%, +2.19%; TN +2.10%, +7.00%, −1.91%. This spread is visible instrumentation cost, not field speedup. Profile inputs and summaries are in Saved/Linux/l76/term-profile-before/, term-profile-constants-only/, and term-profiler-overhead-constants-only/.

Invariants and changes

  • StrataDistance(Z), layer lookup, and bound-stratum lookup are Z-only. FloorAt(P,X,Y) and some projection parameters are XY-only for a fixed primitive/feature, but primitive selection, floor blending, and the resulting composer values still depend on Z.
  • Surface and passage relief use 3D noise; owner warps also depend on effective Z. The SW column cache is not reused for these values.
  • Cached resolved-passage metadata once at field binding: internal-chain and landing flags, first/last floor Q, lower-mouth index, carve margin, and mouth search limits. Per-sample arithmetic order is unchanged. The profiler is opt-in at build time with VOXELFORGE_PROFILE_LEGACY_TERMS=1; timer bodies compile out in default builds.
  • The whole-view effect of the constants hoist is mixed and near noise. No FP reordering was made, hashes stayed identical, and no version bump was needed.

Hashes

Final Clang/GCC candidate per-tile hashes matched the L75 reference for density, mesh, payload, and topology in all 24 compiler × worker × view comparisons (W1/W8/W12, four views). Each compiler/worker set covered 9,661 tiles.

Final Clang/GCC source stamp: 285080616b0c5b65a670a72858e3b7e922b302df183b247c238504d58aa2b82f.

View Tiles Density Mesh Payload Topology
SW 2,850 40b76d0072a2adcd 8559df0850d4d7f1 7700965ff31ac702 0e7f2a16b4cc71a9
FI 2,249 99ca213b21ce86e4 2977525405b79fff 3d7d2efb581710bd af1916c949224871
TN 2,233 8d23c26f5c092be1 15c3aad2e29d9ea0 3d48f68d511c21df 5b1584676884edd8
VS 2,329 876b44981d106be3 aaef57cb08bd6845 b19617df9f4acbb1 e8eee991260adff4

The rows above are the matching W8 Clang whole-view hashes; GCC and the other worker counts matched each corresponding L75 tile hash as well. Per-tile comparison summary: Saved/Linux/l76/hashes/final-clean/summary.json.

Whole-view timing

Three interleaved W8 pairs per view; seconds are (L75 → L76) in pair order. The delta is the median of paired percentage changes.

View Pair times Median paired delta
SW 2.428→2.404, 2.499→2.456, 2.343→2.347 −0.024 s (−0.99%)
FI 4.505→4.668, 4.778→4.635, 4.414→4.413 −0.001 s (−0.02%)
TN 4.389→4.289, 4.132→4.408, 4.417→4.337 −0.080 s (−1.81%)
VS 2.454→2.489, 2.353→2.426, 2.365→2.461 +0.073 s (+3.10%)

The largest median paired change is +0.073 s (VS); the best is −0.080 s (TN). Whole views remain 2.4–4.6 s, far from the ~1 s goal. Passage/support remains the next cost target.

Timing rows and logs are in Saved/Linux/l76/timing-constants-only/summary.json.

Audits and builds

  • Final verify.py fast: PASS in 381.8 s; passage audits, fast-tier hash gates, and controls completed.
  • Final fast-tier summary: Saved/Linux/l76/verify/fast-summary.json.
  • Linux UE host VFHostEditor Linux Development: succeeded in 121.98 s with taskset -c 0-11, -MaxParallelActions=4, and no address-space limit. Three existing RealtimeMesh deprecation warnings were emitted. Log: Saved/Linux/l76/ue-build.log.
  • All headless runs used taskset -c 0-11 and prlimit --as=6442450944; no run exceeded 30 minutes.

Failed runs

  • Broad per-tile passage-loop filtering failed Clang W1 SW hashes: 612 density mismatches and 24 each in mesh, payload, and topology. It was removed.
  • The first fast-tier launch stopped before tests because its output-directory executable had not been built. After building the requested binaries, the final fast tier passed.
  • The first UE invocation used a nonexistent direct Engine/Binaries/DotNET/dotnet path. The engine Build.sh wrapper set up bundled DotNet and the host build succeeded.

No commit, push, or stash was made.