Skip to content

Commit

Permalink
reduce worker count to speed up M2
Browse files Browse the repository at this point in the history
  • Loading branch information
erincatto committed Dec 10, 2023
1 parent d484c6c commit e688e43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion samples/sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ Sample::Sample(const Settings& settings)
{
b2Vec2 gravity = {0.0f, -10.0f};

uint32_t maxThreads = B2_MIN(8, enki::GetNumHardwareThreads());
uint32_t maxThreads = B2_MIN(8, enki::GetNumHardwareThreads() / 2);
printf("Box2D worker count = %d\n", maxThreads);
m_scheduler.Initialize(maxThreads);
m_taskCount = 0;

Expand Down

0 comments on commit e688e43

Please sign in to comment.