From b17c7882e6dd83f728f11e11611f1f925556ba09 Mon Sep 17 00:00:00 2001 From: Jan Huwald Date: Mon, 24 Jun 2013 11:31:17 +0200 Subject: skip unneccessary loops in findCycle diff --git a/cacount.cpp b/cacount.cpp index f135936..7b59563 100644 --- a/cacount.cpp +++ b/cacount.cpp @@ -94,11 +94,11 @@ void init(Trans &t, Trans &c, pbitset &reachable) { void findCycle(Trans &t, Trans &c) { // forward to t=numState; now every state is in a cycle - iterTrans(logState, [&](State s) { + iterTransP(logState, [&](State s, bool &worked) { State n = t[s]; t[s] = t[n]; c[s] = min(c[s], c[n]); - // TODO: detect if anything change, skip later rounds then + if (n != t[s]) worked = true; }, (string) "fwd time", true); // Transients may have a cycle id (minimum state) that is on the // transient (not in the cycle) and thus different from the cycle id -- cgit v0.10.1