From c0c5209f5388f569457a608f11bded0ccba03609 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 23 Jan 2008 23:28:04 +0100 Subject: [PATCH] make the fastest case 'likely()' --- Cython/Compiler/Nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.26.2