perf(core): tile-drain instrumentation; parallel FI sign-edge repair, FI first tile 1.28 -> 0.85 s (L55); R24

Opt-in --instrument-tile-drain records per-tile queue/dispatch/finish timelines, stage spans and counters
(proof skips, X8 lanes, GradAt/midpoint memo, skirts, FI cache stats); <2% when off. Measured: SW 13.3 and
FI 50.2 worker-s across LOD0-8, tails are work-saturated. FI sign-edge repair now computes in parallel and
publishes in sorted serial order (exact output): sign-edge 535 -> 47 ms, FI first tile 1.28 -> 0.85 s, near
ring 1.46 -> 1.04 s, whole view 6.09 -> 5.65 s. Proof block size, lane batching, SW midpoint memo and helper
cap 12 measured and left off. fast/medium/full PASS, Clang and GCC. Research R24: slab + motif generator.

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-25 06:16:07 +01:00
1 parent e35a77f676
commit aee1487410
13 files changed
+882 -74

No files matched your search

+36 -2
View File
@@ -46,6 +46,13 @@ namespace
bool ScreenSpaceGate=false;
bool AuditUniformBlockProofs=false;
bool ProfileLodWork=false;
bool InstrumentTileDrain=false;
bool ExactMidpointDensityMemo=false;
bool ActiveLaneBatching=false;
bool ParallelSignEdgeRepair=false;
bool HasSignEdgeRepairOverride=false;
int ProofBlockCells=8;
int ShapeHelperLimit=8;
bool AuditBasePageEquivalence=false;
bool AuditRouteParity=false;
bool RegionCrossing=false;
@@ -1143,6 +1150,11 @@ namespace
" --screen-space-gate (measure display error and historical negative controls)\n"
" --audit-uniform-block-proofs (fill and check every interval-certified block)\n"
" --profile-lod-work (report per-LOD density sample counts)\n"
" --instrument-tile-drain (opt-in CpuTileTimeline and per-tile stages/counters)\n"
" --exact-midpoint-density-memo (exact-input midpoint query memo A/B)\n"
" --active-lane-batching --proof-block-cells=N (proof-masked density fill A/B)\n"
" --parallel-sign-edge-repair --serial-sign-edge-repair\n"
" --shape-helper-limit=8|12 (default 8; shape build A/B)\n"
" --audit-base-page-equivalence (hash one tile through both shape routes)\n"
" --audit-route-parity (compare page, native-only, exact-query and mesh routes)\n"
" --audit-tile-shape-readiness (run a deliberately mis-marked tile against the native-only guard)\n"
@@ -1190,6 +1202,25 @@ namespace
else if(arg=="--screen-space-gate")options.ScreenSpaceGate=true;
else if(arg=="--audit-uniform-block-proofs")options.AuditUniformBlockProofs=true;
else if(arg=="--profile-lod-work")options.ProfileLodWork=true;
else if(arg=="--instrument-tile-drain")options.InstrumentTileDrain=true;
else if(arg=="--exact-midpoint-density-memo")options.ExactMidpointDensityMemo=true;
else if(arg=="--active-lane-batching")options.ActiveLaneBatching=true;
else if(arg=="--parallel-sign-edge-repair")
{options.ParallelSignEdgeRepair=true;options.HasSignEdgeRepairOverride=true;}
else if(arg=="--serial-sign-edge-repair")
{options.ParallelSignEdgeRepair=false;options.HasSignEdgeRepairOverride=true;}
else if(arg.starts_with("--proof-block-cells="))
{
if(!readInt("--proof-block-cells=",options.ProofBlockCells)
||options.ProofBlockCells<1||options.ProofBlockCells>32)
{std::fprintf(stderr,"--proof-block-cells must be in 1..32\n");return false;}
}
else if(arg.starts_with("--shape-helper-limit="))
{
if(!readInt("--shape-helper-limit=",options.ShapeHelperLimit)
||(options.ShapeHelperLimit!=8&&options.ShapeHelperLimit!=12))
{std::fprintf(stderr,"--shape-helper-limit must be 8 or 12\n");return false;}
}
else if(arg=="--audit-base-page-equivalence")options.AuditBasePageEquivalence=true;
else if(arg=="--audit-route-parity")options.AuditRouteParity=true;
else if(arg=="--region-crossing")options.RegionCrossing=true;
@@ -1751,7 +1782,7 @@ int main(int argc,char** argv)
if(!snapshot)
{std::fprintf(stderr,"Shape interval build failed: %s\n",error.c_str());return 2;}
FStandaloneCoreScheduler scheduler;
FStandaloneCoreScheduler scheduler(static_cast<std::size_t>(options.ShapeHelperLimit));
const FVector cameraStepVoxels=options.HasCameraStep
?FVector(options.CameraStepMeters.X*1000000.0f/std::max<std::uint32_t>(1,ownerWorld->CoreVoxelSizeMicrons),
options.CameraStepMeters.Y*1000000.0f/std::max<std::uint32_t>(1,ownerWorld->CoreVoxelSizeMicrons),
@@ -1768,5 +1799,8 @@ int main(int argc,char** argv)
options.AuditRouteParity,options.AuditResolvedLayoutBoundaries,
options.AuditResolvedLayoutPassages,options.AuditStrateTransitions,
&resolvedLayout,options.StreamHashTiles,options.AuditLandmarkReachability,
options.AuditOreVeinYield,options.AuditNativeCaves);
options.AuditOreVeinYield,options.AuditNativeCaves,options.InstrumentTileDrain,
options.ExactMidpointDensityMemo,options.ActiveLaneBatching,
options.ProofBlockCells,options.HasSignEdgeRepairOverride
?options.ParallelSignEdgeRepair:options.FloatingIslandsRecipe);
}