Skip to content

The reference's benchmark suite and missing tests: nine scenes, SAT runs, test_collision, test_hash, the hash reads every byte (#141, #145) - #153

Merged
nicolas-maman merged 1 commit into
mainfrom
bench/reference-suite
Oct 9, 2026
Merged

nicolas-maman merged 1 commit into
mainfrom
bench/reference-suite

Conversation

@nicolas-maman

Copy link
Copy Markdown
Collaborator

The rest of Box3D e77352c's benchmark suite, and the reference tests a coverage audit found missing or partly ported (#142 to #149 track the rest).

The benchmark suite (#141, closes it). bench/suite.ae ports the nine scenes of benchmark/main.c we lacked (convex_pile, junkyard, large_world, sleep, spinner, trees25/50/100, washer) and its SAT runs. bench/suite_box3d.c runs the reference's own scene functions from shared/benchmarks.c and shared/sat_benchmark.c the same way, and scripts/bench.sh suite runs both. Pinned, best of two, ours against the reference's AVX2 build: 1.04x to 1.21x on every scene. The large world (a million static boxes) and the sleep scene end with the same height sum and contact count to the printed digit. The spinner's motor angle after 800 steps agrees to five digits. The SAT runs found two gaps, filed as #150 (the wide hull SAT, 1.5 to 3.4x) and #151 (the broad phase's boxes in float with outward rounding, as the reference's large-world build keeps them; pairs 1.4 to 1.6x). hull.create_complex_hull, PEEL's convex, comes with the suite: the reference's own 32 points from the same generator, the same hull counts, mass and centre.

test_hash.c (#145, closes it). tests/test_hash.ae holds our content hash to the reference's properties. That found a real defect. basics.hash_bytes read only whole 8-byte words and folded in the word count, so any blobs differing only in a tail of fewer than eight bytes collided: 4,096 zero blobs of different lengths gave 512 digests. It now reads the tail (a new native.load_u8) and folds the byte count, and an empty blob takes the reserved 1 as the reference's does. Every family passes: word pairs, bit flips, lengths, sign flips, ULP steps, boxes, turned boxes, cylinders and cones, height fields, meshes, voxel dispersion, stability. The hash only decides which blocks a compound shares, each confirmed byte for byte, so no result moves. HashVoxelHullDatabase goes with the hull database, #147.

The smaller gaps (#146, most of it):

  • tests/test_collision.ae is test_collision.c whole: box validity, the ray against a box in all twelve cases, a hull manifold and fat bounds at 1e7.
  • test_math.c's remaining checks: every component of m inv(m), the 2x2 inverse and solve at the reference's tolerances, the nlerp twist sweep, and arbitrary_perp, moved to the math module where the reference keeps it.
  • test_allocator.c and test_container.c's partials, in test_basics.ae.
  • test_shape.c's ShapeFlagsTest.
  • test_joint.c's TestNonDynamicJointDisable on its set_type path.
  • test_broad_phase.c's StaticRebuildKeepsMarks, both ways.

Still open in #146: shape names on the def and the maximum manifold points (they need the API of #148), the broad phase stress test, and the SIMD width test.

test_world.c (#142, the partials and one more):

  • EmptyWorld, DestroyAllBodiesWorld and TestWorldRecycle with their steps.
  • TestWorldCoverage's settings round trips.
  • SetBulletDriftTest: the bullet flag holds through set_motion_locks both ways.
  • EnableSleepFlagSyncTest, and EnableContactRecyclingTest's def opt-out.
  • TestCompoundShapeCount on both destroy paths.
  • TestEnlargedProxyDestroyed (the reference's issue 149): no node left marked moved, depth-first order after the next step.

Still open in #142: the compound hit events and materials, the overflow colour pile, the worker count.

Also:

  • The README's install line pinned Aether 0.778.0, which cannot build the eight-wide lanes; it now says 0.794.0 (what CI pins) and the 0.788 floor.
  • design.md item 16 is marked done.
  • Two Aether gaps met on the way are filed upstream with repros: aether#2590 (a struct literal as a module-level var's initializer) and aether#2591 (&f() reaching gcc as "lvalue required"). The tests are written the way the language allows today.

Local gate on Aether 0.794.0: all 33 suites pass, no warnings, and the golden determinism trace matches bit for bit (the hash fix moves no result). Pins: Aether 0.794.0 and aeb v0.325, the latest releases.

Closes #141. Closes #145. Refs #142, #146.

…d the SAT runs, test_collision and test_hash, the hash reads every byte (#141, #145, #142, #146)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant