Skip to content

massive performance gain using C++17 parallel for_each #5

Description

@ker2x

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions