Thanks for helping me out with this.
I find the reason of slow resolution of the timeastar was because the oscillation of low reachedDepth, in average,
it takes about 50-100 loops to rise one depth for one agent, so all in all, it takes about 1000-2000 loops for
a single agent to successfully find its way out by timeastar. The grid has a size of 19x17 cells.
I take your Java counterpart, even with 30x30 cells, it is really quick. I take some stats off the program, yes
it does oscillate at a low depth and gradually rising, but not as unsteadily as mine.
My C++ counterpart takes a lot of CPU cycles to complete one agent timeastar, which is really a challenging problem for me to solve.
I profile the timeastar method, and finding that if I allow diagonal movement, it takes 13 seconds to complete in one particular occasion.
If I don't, it still takes 7 seconds to complete. Urgh.... (Depth is 32 and reduced to 16)