-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Who can provide a C ++ version of the code? #181
Comments
Just search for "C++ A*", an implementation of Breadth First Search, Djikstra and A* can be found here: |
Wow, thank you. My own code is based on redgames. I have tried some of these optimizations, but it has not worked very well. The author said on the webpage that it is not production code and he didn't run the benchmarks. I found that the operation related to the hash is the most time-consuming through testing. At the same time, I doubt whether it is because the close set is not set. I am still trying to improve, but I am not sure if it needs to be rewritten according to Pathfinding. |
The difference of that code to this is that Pathfinding.js stores everything in node objects, so it can execute code on the node without calculating a hash to get the node all the time, maybe that helps you. For further help I think I need your code and your grid-data. |
I thought about this problem before. So now the only way to improve the efficiency of the code is to refactor. This is painful, but may have to be done. |
I have a new discovery. When the C ++ version is set to -O3 optimization, the code runs quickly, close to the speed of Pathfinding.js. But I am not sure if it is always so fast. |
My code has encountered performance problems. I tried many times, and it is difficult to achieve the performance of the repository's code, so I think it may need to be rewritten. If you have a mature solution for me, I will be grateful.
The text was updated successfully, but these errors were encountered: