Commit graph

9 commits

Author SHA1 Message Date
Admin
0bba179884 rapier bench: --stages/--probe diagnostic modes + live stage timers
Instrumentation used to decompose the washer scene (which phase holds
rapier's ~24% advantage over box3d). Timer.rs drops the profiler-feature
gate so PhysicsPipeline's per-stage counters always measure (std Instant
instead of web_time); bench gains --stages (per-phase ms split) and
--probe (per-step contact/pair/sleep counts). Diagnostic tooling only;
no effect on simulation. Findings: washer's rapier advantage is entirely
broad phase (box3d ~8.5s vs rapier 1.7s), box3d's narrow phase is
actually faster than rapier's.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 00:24:56 +02:00
Admin
95eb8086fc box3d: tier-2 feature recycling (port extension) — default on, junkyard -8%
New middle tier between full manifold recycling and the full SAT, behind
WorldDef.enable_feature_recycling (default true; OFF path bit-identical,
hash 0x61E35C31 verified):

- Case A, separated-witness early-out: a previously-non-touching contact
  revalidates only the cached winning axis; still separating beyond the
  speculative distance means done in one test. Sound structurally: any
  cached axis is a valid separation witness (understates only, which
  falls through to the full SAT). Carried junkyard: 24k skips/step,
  full SATs 25.4k -> 4.5k per step.
- Case B, touching feature rebuild: re-clips the cached winning feature
  under explicit staleness bounds (SATCache::sat_pose at last full SAT,
  translation < 4x recycle distance, rotation < ~4.6 deg, forced refresh
  every 8 steps); degenerate rebuilds and touching<->separated
  transitions fall through same-step.

Probe-driven (junkyard: 89k full SATs/step on 105k pairs, 13k touching;
rapier maintains 3.4x fewer pairs): paired same-binary -fr=0/1 A/Bs show
junkyard -8% in every pairing (collide phase -15%), washer neutral to
-5%, pyramid/rain guards neutral, OFF costs nothing. Same-session
cross-engine junkyard: rapier's -8% lead closes to ~-3%.

pgo.sh now trains BOTH modes (single-mode training starved the remaining
full-SAT path); checked-in profile retrained dual-mode. SATCache pose
serialized in snapshots. feature_recycled_contact_count in Counters.
README: port-extension subsection, soundness argument, updated notes.
Also: rapier bench --probe mode from the workload-probe session.

179/185/179/179 tests green with the tier ON, zero warnings,
determinism suite passes across runs/workers/task systems.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 23:40:08 +02:00
Admin
901eafb07b rapier bench: extend to all nine box3d scenes, single-threaded matrix
- libs/rapier/crates/bench now mirrors every box3d benchmark scene
  (trees100/50/25, junkyard, rain, washer added to large_pyramid/
  many_pyramids/joint_grid), same -b indices as the box3d benchmark.
  Geometry, densities, filters, spawn cadence and joint counts match;
  body/collider/joint counts verified equal on all nine scenes.
- Fix an index-out-of-bounds panic in the vendored rapier simd-stable
  constraint grouping (interaction_groups.rs): bodies in a different
  island than the interaction (kinematic drivers, dynamics mid
  island-merge) indexed the wrong island's conflict masks. Out-of-island
  bodies are now exempt from conflict tracking, matching the solver's
  existing boundary treatment (bounds-checked gathers, dropped scatters).
  Original three scenes reproduce their previous timings after the fix.
- README: full nine-scene single-threaded matrix vs rapier (box3d wins
  7/9, +33% geomean; rapier wins the hull-churn scenes junkyard/washer)
  with comparability caveats for the extended scenes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 22:35:55 +02:00
Admin
630577cb98 rapier: restore simd-stable (vendor wide + safe_arch), retest vs box3d
Re-vendors wide 0.7 + safe_arch, restores the upstream simd-stable
wiring in rapier3d/parry3d manifests and the cfg-simd source, and drops
the added 'stripped build does not support SIMD' guards (upstream's
simd-vs-enhanced-determinism exclusivity guard kept).

Interleaved single-thread retest (min of 4): SIMD buys rapier 1.8-2.2x;
box3d vs rapier-simd is now near parity — large_pyramid 1579 vs 1638 ms,
joint_grid 957 vs 1008 ms (box3d ahead), many_pyramids 2389 vs 1970 ms
(rapier ahead). box3d README grid updated with the honest three-column
table; box3d keeps cross-arch determinism + zero deps at that speed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 14:17:26 +02:00
Admin
470cffcdac box3d: rapier comparison — ~2x faster single-threaded, bench in libs/rapier/crates/bench
Same scenes/geometry/materials/dt, matched solver budget (4 substeps vs
4 solver iterations), interleaved min-of-4 runs: large_pyramid 2.23x,
many_pyramids 1.82x, joint_grid 1.88x (geomean ~1.97x). Table + fairness
notes at the top of the box3d README (vendored rapier has no SIMD;
enhanced-determinism measured free on these scenes).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 13:54:05 +02:00
Admin
0fdc86b528 optimisations 2026-03-29 21:01:06 +02:00
Admin
c3ad851992 almost reasonable 2026-03-17 19:00:27 +01:00
Admin
6658d6515f slow voxels 2026-03-15 15:36:30 +01:00
Admin
92e751ffde rapier vendored 2026-03-15 09:52:45 +01:00