Replacing an inefficient use of std::find(...) to use std::set's find() instead.
authorTim King <taking@google.com>
Mon, 9 Nov 2015 19:16:47 +0000 (11:16 -0800)
committerTim King <taking@google.com>
Mon, 9 Nov 2015 19:16:47 +0000 (11:16 -0800)
src/theory/uf/symmetry_breaker.cpp

index bd85b735d31427d28a6898137c0e2013136bcebf..d5e18ed14227f1921b156d5351103a495605da4d 100644 (file)
@@ -743,7 +743,7 @@ SymmetryBreaker::selectMostPromisingTerm(Terms& terms) {
 void SymmetryBreaker::insertUsedIn(Term term, const Permutation& p, set<Node>& cts) {
   // insert terms from p used in term into cts
   //Debug("ufsymm") << "UFSYMM usedIn(): " << term << " , " << p << endl;
-  if(find(p.begin(), p.end(), term) != p.end()) {
+  if (p.find(term) != p.end()) {
     cts.insert(term);
   } else {
     for(TNode::iterator i = term.begin(); i != term.end(); ++i) {