zlktree: speedup the construction of ACD nodes
This uses the foreach_set_index() method introduced in the previous patch to speed up the copy bitvectors in ACD nodes, as pointed in issue #476. Running PREFIXCMD='valgrind --tool=callgrind' ./run python3 -c \ "import spot; spot.acd_transform(spot.automaton('syntcomp_91.hoa'))" went from 65139436227 instruction fetches down to 18490399159. * spot/twaalgos/zlktree.cc (acd::build_): Use foreach_set_index().
This commit is contained in:
parent
b6df1f8f92
commit
6aa2079079
1 changed files with 5 additions and 6 deletions
|
|
@ -482,12 +482,11 @@ namespace spot
|
||||||
n.parent = node;
|
n.parent = node;
|
||||||
n.level = lvl + 1;
|
n.level = lvl + 1;
|
||||||
n.scc = scc;
|
n.scc = scc;
|
||||||
for (unsigned e = 1; e < nedges; ++e)
|
bv->foreach_set_index([&](unsigned e)
|
||||||
if (bv->get(e))
|
|
||||||
{
|
{
|
||||||
n.edges[e] = true;
|
n.edges[e] = true;
|
||||||
n.states[aut->edge_storage(e).src] = true;
|
n.states[aut->edge_storage(e).src] = true;
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
unsigned after_size = nodes_.size();
|
unsigned after_size = nodes_.size();
|
||||||
unsigned children = after_size - before_size;
|
unsigned children = after_size - before_size;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue