Pokemon R/B: Avoid a case of repeatedly checking of state in ER #2376
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this fixing or adding?
This PR changes Pokemon ER to not constantly check state inside the
dead_ends()
function for cases where it should already know the outcome. This PR should not change any actual logic within ER.This seems to save roughly 30%-50% of time spent within
create_regions
. Though the time will still grow as more players are in the generation, and it seemingly does less as more players are completed.Time Before/After running 32 Insanity ER + Trainer Sanity
How was this tested?
Tests + Generations (32 Insanity ER run, 32 Full ER run, 32 Simple ER run, 32 No ER run, and my combined yaml for the big async.)