Add some minor optimizations.
[ginac.git] / ginac / expairseq.cpp
index 9ef8afa9910e081f53bef2f04903c6e12e7235e1..b29f3802c13f2be0f0a55977d6b129c00dd2cdad 100644 (file)
@@ -32,6 +32,7 @@
 #include "utils.h"
 #include "hash_seed.h"
 #include "indexed.h"
+#include "compiler.h"
 
 #include <algorithm>
 #if EXPAIRSEQ_USE_HASHTAB
@@ -1610,7 +1611,7 @@ std::auto_ptr<epvector> expairseq::evalchildren(int level) const
        // returns a pointer to a newly created epvector otherwise
        // (which has to be deleted somewhere else)
 
-       if (level==1)
+       if (likely(level==1))
                return std::auto_ptr<epvector>(0);
        
        if (level == -max_recursion_level)