projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba750d1
)
fix performance hit in argument unpacking when passing keyword arguments into functio...
author
Stefan Behnel
<scoder@users.berlios.de>
Wed, 28 Jul 2010 07:50:38 +0000
(09:50 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Wed, 28 Jul 2010 07:50:38 +0000
(09:50 +0200)
Cython/Compiler/Nodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Nodes.py
b/Cython/Compiler/Nodes.py
index 03b593fdca6342bd094d55d4be297ef4d03fa97e..6069072ca37acf50d7905c2a36d1c063dcac8663 100644
(file)
--- a/
Cython/Compiler/Nodes.py
+++ b/
Cython/Compiler/Nodes.py
@@
-2647,10
+2647,10
@@
class DefNode(FuncDefNode):
if arg.kw_only:
# handled separately below
continue
- code.putln('if (kw_args >
%d) {' % num_required_args
)
+ code.putln('if (kw_args >
0) {'
)
code.putln('PyObject* value = PyDict_GetItem(%s, %s);' % (
Naming.kwds_cname, pystring_cname))
- code.putln('if (
unlikely(value)
) { values[%d] = value; kw_args--; }' % i)
+ code.putln('if (
value
) { values[%d] = value; kw_args--; }' % i)
code.putln('}')
else:
num_required_args -= 1