A* C++ implementation is too slow
As a guideline: your inner loop should contain no operation more expensive than O(log(N)). This means no iterating over the entire closed/open list, and no making heaps over and over again! Here's how:


Use a std::set sorted by weight instead of a heap. begin() is your next node, and to update the weight of a node first remove it from the set, change the weight, and put it back again.
Don't use find_if to test for set inclusion. Use an std::unordered_set for the closed or open nodes.