Optimize Broad-Phase (#159)
Broad-phase optimization ported from Box2D.
This commit is contained in:
parent
954cf879e7
commit
f555ee4208
51 changed files with 3802 additions and 1830 deletions
|
|
@ -78,6 +78,8 @@ void b3ParallelFor( b3World* world, b3ParallelForCallback* callback, int itemCou
|
|||
// block size grows once items exceed maxBlockCount * minRange
|
||||
// so the block count stays bounded and per-block sync overhead stays low.
|
||||
// Benchmarking shows 32 is optimal for the convex pile benchmark and others.
|
||||
// This is a lot different than Box2D because the 3D narrow phase cost
|
||||
// varies a lot.
|
||||
int blocksPerWorker = 32;
|
||||
int maxBlockCount = blocksPerWorker * workerCount;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue