Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed the core of KmodPathFinder to use a single block of memory.
node_map is now a multi_array<FAStarNode, 2>, and the path finder no longer uses any shared_ptr. This change will (usually) use a bit more memory than the previous implementation, but I expect it to be significantly faster, because there will be fewer memory lookups and far fewer allocations and deallocations. Initial testing suggests this makes the path finder around 25% faster, but that it is still only a tiny speed boost overall. Apparently I forgot that the path finding is no longer a large part of the total CPU time.
- Loading branch information
Showing
2 changed files
with
110 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters