projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
529bfff
)
make the fastest case 'likely()'
author
Stefan Behnel
<scoder@users.berlios.de>
Wed, 23 Jan 2008 22:28:04 +0000
(23:28 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Wed, 23 Jan 2008 22:28:04 +0000
(23:28 +0100)
Cython/Compiler/Nodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Nodes.py
b/Cython/Compiler/Nodes.py
index 437493b28f54bb877b28f0bff27d677c89467614..f13df2abdf498b1672dcd47aa450a65278a77ce8 100644
(file)
--- 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))