Skip to content
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

Multiple optimizations (speed and memory usage improvement) #7

Merged
merged 7 commits into from
Oct 12, 2019

Conversation

facontidavide
Copy link
Contributor

@facontidavide facontidavide commented Oct 7, 2019

15% speed improvement when using the default heuristics.

@facontidavide facontidavide mentioned this pull request Oct 7, 2019
@facontidavide
Copy link
Contributor Author

It is actually faster now

Old benchmark

BM_AStar_Big          129443995 ns    129443311 ns           32
BM_AStar_Smooth_1000   91320707 ns     91319632 ns           46
BM_AStar_Small          5938943 ns      5938910 ns          706

New benchmark

BM_AStar_Big           94683926 ns     94681340 ns           73
BM_AStar_Smooth_1000   65355006 ns     65354110 ns          107
BM_AStar_Small          4174486 ns      4174392 ns         1676

@facontidavide
Copy link
Contributor Author

By the way, we are also using 20% mess RAM in this branch.

@facontidavide facontidavide changed the title avoid one level of indirection of std::function (the heuristic function) Multiple optimization (speed and memory usage improvement) Oct 8, 2019
OCTOGONAL is the new default heuristic
@facontidavide facontidavide changed the title Multiple optimization (speed and memory usage improvement) Multiple optimizations (speed and memory usage improvement) Oct 8, 2019
@chataign chataign merged commit d8f6933 into master Oct 12, 2019
@chataign chataign deleted the optimization branch October 12, 2019 10:56
@chataign
Copy link
Collaborator

I didn't check all the changes in detail but it looks good and is faster. I merged a change from master to only clear the cells that were visited, I found that it makes a big difference also. I created tag v1 with the previous version before the merge. Thanks for all the work!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants