From: Stefan Behnel Date: Wed, 23 Jan 2008 22:28:04 +0000 (+0100) Subject: make the fastest case 'likely()' X-Git-Tag: 0.9.6.14~29^2~53 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c0c5209f5388f569457a608f11bded0ccba03609;p=cython.git make the fastest case 'likely()' --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 437493b2..f13df2ab 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -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))