MESHTEN LAB•Graphics & Engine
July 31, 2026•Verification Study
39.7 Million Random Pairs Found Zero Bugs. 144 Targeted Pairs Found Two.
A 7.91x bounds speedup that had to stay bit-identical, and the signed-zero case random fuzzing could not reach.
Core Finding:We sped up a per-vertex world-bounds routine 7.91x under a hard bit-identity constraint. The obvious fast min/max instructions differ from the library functions on signed zero, a case that a 39.7-million-pair random float fuzz never hit and a 144-pair targeted table hit twice. The shipped version corrects the zero sign once after the loop and stays bit-identical.
Per-vertex cost
7.91x
Per-vertex cost: 20.702 ns to 2.616 ns, 7.91x, bit-identical; zero call instructions in the compiled inner loop.
Random fuzz vs targeted table
39.7 million pairs
Random-float fuzz: 39.7 million pairs, 0 mismatches. Targeted class table: 144 pairs, exactly 2 mismatches, both signed-zero ties.
Gate corpus
6,105 derive cases
Gate corpus: 6,105 derive cases, 0 bit-level mismatches; with the falsifier enabled, 4 mismatches and the gate exits 1.
Downstream residency stress
6.6x
Downstream residency stress, 239 moving objects at live scale: 7.3295 ms to 1.1079 ms (6.6x).
Empirical Findings Table
A bit-identical bounds speedup and the signed-zero case fuzzing missed| Telemetry Metric | Measured Value | Context & Observability |
|---|---|---|
| Per-vertex cost | 7.91x | Per-vertex cost: 20.702 ns to 2.616 ns, 7.91x, bit-identical; zero call instructions in the compiled inner loop. |
| Random fuzz vs targeted table | 39.7 million pairs | Random-float fuzz: 39.7 million pairs, 0 mismatches. Targeted class table: 144 pairs, exactly 2 mismatches, both signed-zero ties. |
| Gate corpus | 6,105 derive cases | Gate corpus: 6,105 derive cases, 0 bit-level mismatches; with the falsifier enabled, 4 mismatches and the gate exits 1. |
| Downstream residency stress | 6.6x | Downstream residency stress, 239 moving objects at live scale: 7.3295 ms to 1.1079 ms (6.6x). |
| In-loop tie handling | 22.0 ns/vertex | Handling the tie inside the loop was correct but measured 22.0 ns/vertex vs the library form's 21.0, so it was rejected. |
| Post-loop exactness fix | about 4% | Cost of the post-loop exactness fix: about 4% (2.731 ns/vertex without it), inside run-to-run noise. |
| Exhaustive finite-check | 2^32 | Replacement finite-check verified exhaustively over all 2^32 float bit patterns: 0 mismatches. |
Engineering Action Directives
- Random bit patterns almost never land on +0 or -0, so random fuzzing is a poor witness for floating-point edge classes. A small table built from the input classes the code treats specially found what tens of millions of random samples did not.
- A correctness gate is only as good as its corpus. Asserting first that the corpus reaches the hard cases, and then proving the gate fails when the fix is removed, is what made the zero-mismatch result mean something.
Methodology Boundaries & Limits
- One compiler, one CPU, one build configuration; other toolchains may compile the library min/max differently.
- Timings are microbenchmark figures on the development machine; the commit does not record repeat counts or variance beyond calling the 4% difference noise.
- The downstream 6.6x is a stress-harness figure, not a whole-game frame measurement.