-
Notifications
You must be signed in to change notification settings - Fork 681
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
Optimize channel computation #8285
Conversation
I think you mean it goes from O(N^2) to O(N) I hoper |
Since the method of jumping the path calculation is essentially what timsort does, I think this will be closer to Time contributed from pathing: Still a crazy improvement over the current implementation but I think if you invented an O(N) graph pathing algorithm then you'd solve the travelling salesman problem so I'm hesitant to believe this is O(N) |
Yes 😄 |
The new algorithm is linear time because there are at most 2 jumps. (In theory. I have to double-check that this is true in practice.) As a side note, BFS and DFS are both linear time traversal algorithms. And BFS can find shortest paths in linear time, the catch is that it only works with unweighted edges. |
Is this something that can be backported to 1.20 (I don't know your guidelines on versioning)? I'd really like to get it into Monifactory and I can do the backport work/make a PR if you're alright with that |
@bk5115545 Backported as 15.3.0-beta |
You're amazing. Thank you! |
usedChannels
vslastUsedChannels
for bothGridConnection
andGridNode
.pathfindingStepsPerTick
config option.