Closed Insopitus closed 2 months ago
You are enabling parallelism properly.
Not all of the physics pipeline is parallelized at the moment. In particular the broad-phase and the island calculation are not parallel. The force calculation is parallel but only if you have multiple islands (i.e. if not all your balls are interacting in a single big pile).
Got it. Thank you.
I have a app that do physics simulation of around 10,000 to 1,000,000 balls in a scene. Parallelism seems like a good way to boost performance. I add rapier in
Cargo.toml
like this:rapier3d = {version = "0.18.0", features = ["simd-stable","parallel"]}
. But when I run the simulation withphysics_pipeline.step(...)
, the CPU usage of the app is only around 20%. My CPU is a Intel i5-10200H.Am I not enabling parallelism properly?