feat: significant performance and stability improvements - #973
Merged
Conversation
sebcrozet
force-pushed
the
optimizations
branch
from
August 2, 2026 22:46
0310956 to
74ed5a2
Compare
sebcrozet
force-pushed
the
optimizations
branch
from
August 2, 2026 22:53
74ed5a2 to
b0fb371
Compare
Member
Author
|
The python bindings will be fixed in a follow-up PR. |
This was referenced Aug 3, 2026
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.
This PR introduces significant performance an stability improvements. See individual commit messages and the changelog for details. In particular:
parallelfeature is now worth enabling for all types of scenes, even smaller ones where the overhead was prohibitive in previous versions of Rapier. (Note that I used Claude Code to help with testing and fixing soundness issues & miri tests).simd-stableandsimd-nightlyfeatures. Simd is now always enabled (and automatically fallbacks to scalar on unsupported targets).enhanced-determinismfeature is enabled.enhanced-determinismno longer has any measurable overhead (at least not on my Macbook Pro M4 Max).The graphs below show performance comparisons of various 2D and 3D physics engines in single-thread and multi-thread mode. The benchmarks are run on a Macbook Pro M4 Max. The general trends are that the new rapier is:
NOTE: the benchmark code was entirely generated by AI (with manual validation of some of them). In addition, the Avian solver step count was set to 4 instead of the default 6, to match the solver count of Box2D/3D and Rapier. All parallel benchmarks use 8 threads.