Skip to content

Commit

Permalink
optimize search when only one state is active
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightguth committed Nov 27, 2024
1 parent 3a0b23d commit dcba1cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion runtime/util/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ std::unordered_set<block *, hash_block, k_eq> take_search_steps(
while (!states.empty() && depth != 0) {
state = states.front();
states.pop_front();
states_set.erase(state);
if (states.size() == 0) {
states_set.clear();
} else {
states_set.erase(state);
}

if (depth > 0) {
depth--;
Expand Down

0 comments on commit dcba1cf

Please sign in to comment.