make the fastest case 'likely()'
authorStefan Behnel <scoder@users.berlios.de>
Wed, 23 Jan 2008 22:28:04 +0000 (23:28 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 23 Jan 2008 22:28:04 +0000 (23:28 +0100)
Cython/Compiler/Nodes.py

index 437493b28f54bb877b28f0bff27d677c89467614..f13df2abdf498b1672dcd47aa450a65278a77ce8 100644 (file)
@@ -1349,7 +1349,7 @@ class DefNode(FuncDefNode):
 
         if self.star_arg:
             star_arg_cname = self.star_arg.entry.cname
-            code.putln("if (PyTuple_GET_SIZE(%s) <= %d) {" % (
+            code.putln("if (likely(PyTuple_GET_SIZE(%s) <= %d)) {" % (
                     Naming.args_cname, nargs))
             code.put_incref(Naming.args_cname, py_object_type)
             code.put("%s = %s; " % (star_arg_cname, Naming.empty_tuple))