using parallel for_each you can drasticaly improve performance in physic.hpp :
#include <execution>
//...
void findContacts() const
{
std::for_each(std::execution::par_unseq, std::begin(grid.used), std::end(grid.used),
[this](uint32_t g)
{
checkCellCollisions(g);
}
);
}
i switched to SFML master (future SFML 3, the migration took 5mn of refactoring) but even SFML 2.5 is compatible with C++17.
using parallel for_each you can drasticaly improve performance in physic.hpp :
i switched to SFML master (future SFML 3, the migration took 5mn of refactoring) but even SFML 2.5 is compatible with C++17.