standalone: canonical AVX2 noise + factored lattice hashes -- whole view 1.40 -> 1.09 s, world unchanged

- Octave noise evaluated in AVX2 batches (one canonical path), fBM and ridged share samples, lattice
  hash products factored; the outputs are preserved: W1/W8 and pre-change hashes equal across 44
  fields, six fixed captures pixel-identical, remote views differ by at most one pixel.
- Routes 5642/5642, shape and far-survival audits pass, bad-shell control still fails.
Verified by me, interleaved head to head (8 workers, cold, BelowNormal 0xFF00): 1.092 / 1.098 s
vs 1.408 / 1.396 s for round 7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MmSoF64BbRFmk9C3p1VsBJ
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-05 02:58:46 +02:00
1 parent d4fa89204d
commit 16612acba4
5 files changed
+459 -148

No files matched your search

@@ -1,5 +1,68 @@
# Shape world speed round — final half-load verification
## Round 8 — canonical AVX2 shape arithmetic (2026-10-05)
The AVX2 path plus factored corner hashing cuts the direct cold W8 process mean from **1.456 s to 1.149 s** (21.1%). It misses the requested **under-1-second** target by 149 ms at the mean; the faster new run was 1.146 s. The full 110.90 MiB payload remains enabled, all 2,226 requested tiles were generated, and every direct run recorded zero mesh-cache hits. The field passes the shape and far-survival audits, the 5,642 route samples remain open, all 44 W1/W8 hash fields match, and the six fixed captures are pixel-identical to Round 7.
### Arithmetic and profile
`VoxelNoise::Perlin3D_x8` evaluates eight independent samples with AVX2 integer hashing and gradient/interpolation arithmetic. `FractalPair` packs the main and fine octave coordinates into the same batch and shares each sample across fBM and ridged accumulation. Domain-warp channels also use the 8-lane path. The cave detail line reuses its spatial-bin items across consecutive sorted Z samples, and coarse rock-distance lookup remembers the previous bin per thread. The hash keeps its existing three mix rounds. For each Perlin lattice, the three corner-coordinate products are now computed once; adjacent corner products use wrapping integer adds, preserving all hash outputs while removing repeated vector multiplies. A reduced-round hash probe changed the field and did not improve time, so it was discarded.
This is the standalone harness's canonical path, with no runtime CPU dispatch. The host requires AVX2. Intrinsics issue multiply and add separately; the build uses `/fp:precise` to prevent contraction. The AVX2 kernel uses no CRT transcendental functions. Build settings also include `/arch:AVX2` and `/MP8`.
| W8 profile measure | Round 7 scalar path | Round 8 final | Change |
| --- | ---: | ---: | ---: |
| Shape stage | 690.9 ms | 478.9 ms | -30.7% |
| Surface detail band | 448.3 ms | 245.1 ms | -45.3% |
| Detail evaluation sample | 792.7 ns | 328.0 ns | -58.6% |
| Owner roughness sample | 572.7 ns | 107.2 ns | -81.3% |
| Detail evaluations | 3,527,283 | 3,527,283 | same workload |
The profile starts at [Round 8 before](round8_profile_before_w8.stdout.log), passes through [AVX2](round8_profile_after_avx2_w8.stdout.log), [shared noise](round8_profile_after_opt_w8.stdout.log), and [paired octaves](round8_profile_after_pair_w8.stdout.log), and ends at the current [factored-hash profile](round8_hash_factored_profile_w8.stdout.log). The distance sample moved from 128.4 ns to 117.3 ns in the final profile; most of the gain is in owner noise. The hash-factor probe's alternating direct runs averaged 1.196 s for the preceding AVX2 executable and 1.145 s for the factored probe: [base A](round8_hash_factored_base_a_w8.stdout.log), [probe A](round8_hash_factored_probe_a_w8.stdout.log), [base B](round8_hash_factored_base_b_w8.stdout.log), [probe B](round8_hash_factored_probe_b_w8.stdout.log).
An isolated W8 LOD8 mesher profile processed 306 tiles / 2.10 M samples. Its [tile profile](round8_tile_profile_lod8_w8.stdout.log) attributes 125.8 ms to density-grid construction within a 403 ms serial tile-benchmark run. This diagnostic exercises the base mesher and does not include the streamer's source-aware repair panels, so it is not a replacement for the full-payload direct timing. It confirms density sampling is material; no separate mesher rewrite was retained this round.
### Required cold direct head-to-head
Both executables were launched in fresh processes with `--stream-benchmark --shape-world --force-generate --workers=8 --clip-radius=3`. The old executable is `VoxelForgeShapeSurvivalSearch.exe`; the new one is `VoxelForgeShapeRound8Final.exe`. The wrapper held BelowNormal priority and affinity `0xFF00`. Each run generated the full payload with `cache_hits=0` and `payload_alloc=110.90MiB`.
| Pair | Executable | Process wall | Shape stage | Full clipmap | Cache hits |
| --- | --- | ---: | ---: | ---: | ---: |
| A | Round 7 | 1.453 s | 698.2 ms | 648 ms | 0 / 2,226 |
| A | Round 8 | 1.146 s | 453.5 ms | 585 ms | 0 / 2,226 |
| B | Round 7 | 1.459 s | 698.2 ms | 638 ms | 0 / 2,226 |
| B | Round 8 | 1.152 s | 472.7 ms | 574 ms | 0 / 2,226 |
Logs: [old A](round8_final_ab_old_a_w8.stdout.log), [new A](round8_final_ab_new_a_w8.stdout.log), [old B](round8_final_ab_old_b_w8.stdout.log), [new B](round8_final_ab_new_b_w8.stdout.log). The new mean is 1.149 s versus 1.456 s old. The matching shape-only profiles with attribution are separate runs and are not included in these wall times.
### Determinism and audits
The new executable's `--stream-hash` run at W1 and W8 matched density, mesh, payload, and topology for full detail, whole view, and each LOD0–8: **44/44 fields pass**. The [comparison output](round8_final/hash_compare_run.log) also confirms all 44 final fields equal the preceding AVX2 executable; it is generated by [compare_hash_runs.py](round8_final/compare_hash_runs.py). Full-detail hashes are density `0x67609e3f9aa3a0b0`, mesh `0xd98eb46b92a59917`, payload `0x8f148240ca4a4a8f`, topology `0x954e28f6fd44967f`. Whole-view hashes are density `0xa78b0985b1b8fefd`, mesh `0xb44e0c998152d1f5`, payload `0x1eb6b48127fd8e26`, topology `0x8b2557006b5ce3c8`. Raw runs: [W1](round8_final_hash_w1.stdout.log) and [W8](round8_final_hash_w8.stdout.log).
The [shape audit](round8_final_shape_audit_w8.stdout.log) passes walkability (**5,642/5,642**), room-floor join, floor slope and profile, tunnel radius, flat surface, grid stair, thin sheet, surface-band family, flat patch, and detail-scale checks. The [far-survival audit](round8_final_far_audit_w8.stdout.log) passes all 7,200 boundary surfaces and 10,976 connectors across 178,351 connector sections: zero missing, holes, or unsampled connectors. The audit also records 47,858 extra mesh ray hits. The injected [bad-shell control](round8_final_bad_shell_w8.stdout.log) removed 512 triangles, detected 16 missing surfaces and 16 holes, and exited 14 as expected.
### Captures
All six fixed captures compare pixel-identically with Round 7. The four X=500 m remote views have only small pixel differences. The [comparison log](round8_final/capture_compare.log) compares all ten images; the images are in [round8_final](round8_final/).
| View | Changed pixels | Mean channel delta | Max channel delta |
| --- | ---: | ---: | ---: |
| Fixed chamber / tunnel / passage / far / floor close-up / tunnel bend | 0 / 1,024,000 each | 0 | 0 |
| Remote yaw 0 | 0 / 1,024,000 | 0.000000 | 0 |
| Remote yaw 90 | 1 / 1,024,000 | 0.000000 | 1 |
| Remote yaw 180 | 0 / 1,024,000 | 0.000000 | 0 |
| Remote yaw 270 | 0 / 1,024,000 | 0.000000 | 0 |
### Failed and discarded attempts
- The first AVX2 build invocation returned shell exit 1 because its relative `Tee-Object` destination was resolved after `Build.ps1` changed directories. The compiler had already produced the executable. Retrying with an absolute log path succeeded: [build log](round8_avx2_build.log). The hash-factor probe build succeeded: [probe build](round8_hash_factored_build.log), followed by the final `/MP8` build: [final build log](round8_hashfactored_final_build.log). Builds emit existing C4838 narrowing warnings and a `vswhere.exe`-not-recognized diagnostic; neither stops compilation. No process reported `0xC0000142`.
- The first chamber capture used an absolute output path containing spaces; argument splitting made the executable treat the remainder as its owner-data path, and that run exited 2. Using a Standalone-relative capture path succeeded: [failed invocation stderr](round8_capture_fixed_chamber_w8.stderr.log), [retry](round8_capture_fixed_chamber_retry_w8.stdout.log). The other nine captures succeeded on their first invocation.
- The reduced-round hash experiment built and ran, but changed candidate counts/field output without a timing gain; its source was reverted. Evidence: [probe build](round8_hash_build.log), [profile](round8_profile_after_hash_w8.stdout.log).
- A far-ray prune probe completed but did not improve direct time and was reverted: [build](round8_prune_build.log), [direct probe](round8_prune_direct_probe_w8.stdout.log).
- The bad-shell control is the intentional failing audit described above (exit 14). No other Round 8 benchmark, audit, or capture run failed.
All build and executable runs were constrained to BelowNormal priority and affinity `0xFF00`; builds used `/MP8`. No viewer that this work did not start was closed. Changes and artifacts are confined to `Standalone\`; no commit, push, or stash was made.
## Round 7 — sparse far repairs and single shape compile (2026-10-05)
Round 7 cut the LOD8 survival build from **276.74 MiB** to **110.90 MiB** of full mesh-payload allocation, a 59.9% reduction from Round 6. The final CPU follow-up keeps that payload and trims about 0.28 seconds from summed worker time and 0.04 seconds from stream wall. The result remains **18.29 MiB above** the no-shell 92.61 MiB baseline, and the process-wall target below 1.3 seconds was not reached.