Skip to content

Ball joint point fields beside the impulse; solve parts in the benches - #239

Merged
nicolas-maman merged 2 commits into
mainfrom
joint-hot-fields
Nov 25, 2026
Merged

nicolas-maman merged 2 commits into
mainfrom
joint-hot-fields

Conversation

@nicolas-maman

Copy link
Copy Markdown
Collaborator

Progress at a glance

  • SphericalJoint: anchor_a, anchor_b and delta_center_f moved next to linear_impulse
  • SNAPSHOT_VERSION 13 for the layout change
  • Both suites print the solve's parts: setup, constraints, transforms, bullets
  • Full local suite on Aether 0.944.0: green, golden trace bit for bit, no warnings

Why

A plain ball joint's warm start and solve read the flags, indices and impulse at the front of the joint's data, and its anchors and centres' offset at the end, about 700 bytes further on. So every pass over the joint grid's 19,800 joints fetched one more cache line, away from the others it needed. Our JointSim is 1064 bytes against Box3D's 444, so where the hot fields sit matters.

Numbers

Joint grid, pinned, best of 6, ms per step:

main this PR Box3D single Box3D double
10.90 10.36 10.48 10.31

Solve parts

The new line shows large world's gap is entirely in the constraint stages: 6.3 µs against 4.75, while our setup is slightly faster than Box3D's. Large world's colours each hold one nearly empty wide slot, so the out-of-line body gather dominates there. That is aether#3849, now first in Aether's next batch.

A plain ball joint's warm start and solve read the flags, the indices
and the impulse at the front of the joint's data and its anchors and
centres' offset (anchor_a, anchor_b, delta_center_f) at the end, about
700 bytes on: every pass over the joint grid's 19,800 joints fetched a
line apart from the rest. The three now follow the impulse. Joint grid,
pinned, best of 6: 10.90 to 10.36 ms a step (Box3D 10.48 single
precision, 10.31 double). Bits unchanged; SNAPSHOT_VERSION 13 for the
layout.
@nicolas-maman
nicolas-maman merged commit 2bd6387 into main Nov 25, 2026
3 checks passed
@nicolas-maman
nicolas-maman deleted the joint-hot-fields branch November 25, 2026 02:04
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