Skip to content

Commit

Permalink
faster vector, better loops
Browse files Browse the repository at this point in the history
  • Loading branch information
samo538 committed Dec 20, 2024
1 parent d232b58 commit b97255d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/nfa/operations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace {
result_sim_tmp[i].resize(no_states, true);
}

// TODO this is very memory inefficient
// This is very memory inefficient
for (size_t x = 0; x < alph_syms.size(); x++){ // Indexing every Symbol with an number
if (index_map.size() <= alph_syms[x]){
index_map.resize(alph_syms[x] + 1 ,0);
Expand Down Expand Up @@ -123,8 +123,7 @@ namespace {
}
}
}
usage_map.clear(); // Reset the usage map
usage_map.resize(alph_syms.size(), false);
std::fill(usage_map.begin(), usage_map.end(), false);
}
}
// ! End of initial refinement
Expand Down

0 comments on commit b97255d

Please sign in to comment.