Skip to content

Add criterion benchmarks for contact manifolds and GJK/EPA (all four crates) - #440

Open
marknefedov wants to merge 3 commits into
dimforge:masterfrom
marknefedov:criterion-benchmarks
Open

Add criterion benchmarks for contact manifolds and GJK/EPA (all four crates)#440
marknefedov wants to merge 3 commits into
dimforge:masterfrom
marknefedov:criterion-benchmarks

Conversation

@marknefedov

@marknefedov marknefedov commented Aug 14, 2026

Copy link
Copy Markdown

Adds harness = false criterion benches for the narrow-phase hot paths: steady-state convex/convex manifold updates (cuboid/cuboid, capsule/capsule, the generic PFM pair), trimesh-vs-convex persistent manifolds with workspace reuse, and GJK/EPA contact queries at separated, shallow and deep-penetration configurations. Poses drift each iteration so contact tracking stays on the rebuild-and-match path.

The bench bodies are written against Real; the f64 crates reuse them verbatim through a two-line extern-crate alias shim. parry2d has 2D-native bodies (hexagon/capsule as the PFM pair, a triangulated band as terrain), shared the same way with parry2d-f64.

Declaring any [[bench]] turns off bench auto-discovery, so the pre-existing nightly libtest bench (benches/all.rs) has an explicit manifest entry. The file itself is unchanged. The new benches run on stable.

A third bench target, bvh_queries, covers AABB interference enumeration, ray casts, and point projection through the TriMesh query API, and the manifold group gains two FIX_INTERNAL_EDGES variants that put the per-triangle pseudo-normal fetch on the measured path.

New harness=false bench targets for parry3d covering steady-state
convex/convex and trimesh manifold updates plus GJK/EPA contact
queries. The pre-existing nightly libtest bench (benches/all.rs) is
kept unchanged and declared explicitly since manual [[bench]] entries
disable auto-discovery.
The parry3d bench bodies are parameterized over Real and reused by
parry3d-f64 through extern-crate alias shims; parry2d gets 2D-native
bodies (hexagon/capsule PFM pair, triangulated-band terrain) shared
the same way with parry2d-f64.
bvh_queries: AABB interference enumeration, ray casts, and point
projection through the TriMesh query API. contact_manifolds gains two
variants with TriMeshFlags::FIX_INTERNAL_EDGES so the per-triangle
pseudo-normal fetch is on the measured path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant