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

Noticed inconsistancy with path times (same path) #2

Closed
SimonDarksideJ opened this issue Aug 4, 2017 · 1 comment
Closed

Noticed inconsistancy with path times (same path) #2

SimonDarksideJ opened this issue Aug 4, 2017 · 1 comment
Assignees
Labels

Comments

@SimonDarksideJ
Copy link

Done some more random testing, then tried some repeated path testing and seeing some inconsistencies.

Attached a quick video to demonstrate.

Showing times for the same path, resolved repeatedly.

Times range from 0.11 to 2.0 for repeatedly checking the same path. Should possibly have some caching or checks. However, the spikes are a slight concern.

Not sure if it's an issue or not, or just scope for improvement.

Just an observation for now.

@roy-t
Copy link
Owner

roy-t commented Aug 4, 2017

Unfortunately I do not see the video attached so I cannot really see what happened. But I see the same

Note the times displayed in the window are in milliseconds (so 0.11 is really fast) and are just there to give you a sort-of indication. Its notoriously difficult to measure times correctly but the implementation is fully deterministic (no randomness) so every time you execute it the exact same instructions are performed.

I'd attribute the large differences you see to warm-up times and to Windows doing something else. Its all running in the UI thread so the priority is not very high. The viewer needs a lot of improvements :).

To get a better idea of the true speed of the algorithm try the benchmark project and add your own benchmark. It uses Benchmarks.net and performs all kinds of tricks to makes sure its not interrupted, the CPU is not throttled down, etc.. You can see the results of the benchmark that I ran on the bottom of the project page (https://github.com/roy-t/AStar)

Adding caching is a great idea. As long as you don't change any of the weights previously computed paths stay valid. I'm going to open a new ticket for that.

I'll keep this issue open to give you a chance to attach the video again and to see if you agree with my assessment. Again, your feedback is greatly appreciated!

@roy-t roy-t added the question label Aug 4, 2017
@roy-t roy-t self-assigned this Aug 4, 2017
@roy-t roy-t closed this as completed Aug 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants