Repository navigation
Joint grid at 1.05x Box3D: float joint inertias, the warm start skips a zero angular sum (#121) - #137
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The joint grid's solve and relax were already ahead of Box3D
e77352c; the gap was the warm start and the prepare (#121). Two changes, neither of which moves a bit of any result (the golden determinism trace is unchanged):JointSimkeeps the bodies' world inertias in float, as the body sims hold them; the joint solvers widen them where they read them. They were floats widened at the prepare, so nothing rounds differently. The record goes from 912 bytes to 840.tests/test_joint_solver.aepins that invariant: every part turned off leaves no angular impulse, and the warm start of a plain point moves the body by the point's impulse alone.Joint grid, pinned to one core, 8 runs each interleaved, ms per step:
e77352c, AVX2Stages: warm start 1.97-2.23 to 1.37-1.40 ms (Box3D 1.17-1.26), prepare 1.10-1.23 to 0.93-0.95 (0.51-0.58). The grid goes from 1.1x the reference to 1.05x.
Tried and dropped, written up in
bench/RESULTS.md: the spherical joint's frames, impulses, axes and masses in float as the reference keeps them. The warm start only reached 1.5-1.6 ms, and the solve and relax lost 0.3 ms each to the narrowing and widening on their impulse-to-velocity chain. Computing the limit axes only for joints with a limit gained nothing, since GCC already sinks them. What remains is the double arithmetic over float records: each read widens and each store narrows, where the reference computes in float throughout.Refs #121.