]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Small speedup in the cnf generator.
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Sun, 30 May 2010 10:40:40 +0000 (10:40 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Sun, 30 May 2010 10:40:40 +0000 (10:40 +0000)
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@808 e59a4935-1847-0410-ae03-e826735625c1

src/to-sat/ToCNF.cpp

index 96b5bd5cfdfec48446f297b8919a17213cf7c8a0..27ac7a0913c37284e6d7fe7344443849184bee83 100644 (file)
@@ -1359,10 +1359,16 @@ namespace BEEV
           {
             renamesibs = true;
           }
-        oldpsi = psi;
-        psi = ClauseList::PRODUCT(*psi, *clauses);
+
+        if (clauses->size() ==1)
+               psi->INPLACE_PRODUCT(*clauses);
+        else
+        {
+            oldpsi = psi;
+               psi = ClauseList::PRODUCT(*psi, *clauses);
+               DELETE(oldpsi);
+        }
         reduceMemoryFootprintNeg(*it);
-        DELETE(oldpsi);
       }
 
     info[varphi]->clausesneg = psi;