Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
40c0656e
Commit
40c0656e
authored
Aug 15, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix slight performance regression in for-in looping code
parent
cc369a19
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+3
-3
No files found.
Cython/Compiler/ExprNodes.py
View file @
40c0656e
...
...
@@ -2366,7 +2366,7 @@ class IteratorNode(ExprNode):
self
.
may_be_a_sequence
=
not
sequence_type
.
is_builtin_type
if
self
.
may_be_a_sequence
:
code
.
putln
(
"if (
PyList_CheckExact(%s
) || PyTuple_CheckExact(%s)) {"
%
(
"if (
likely(PyList_CheckExact(%s)
) || PyTuple_CheckExact(%s)) {"
%
(
self
.
sequence
.
py_result
(),
self
.
sequence
.
py_result
()))
if
is_builtin_sequence
or
self
.
may_be_a_sequence
:
...
...
@@ -2471,8 +2471,8 @@ class IteratorNode(ExprNode):
return
if
self
.
may_be_a_sequence
:
code
.
putln
(
"if (
!%s
) {"
%
self
.
iter_func_ptr
)
code
.
putln
(
"if (
PyList_CheckExact(%s
)) {"
%
self
.
py_result
())
code
.
putln
(
"if (
likely(!%s)
) {"
%
self
.
iter_func_ptr
)
code
.
putln
(
"if (
likely(PyList_CheckExact(%s)
)) {"
%
self
.
py_result
())
self
.
generate_next_sequence_item
(
'List'
,
result_name
,
code
)
code
.
putln
(
"} else {"
)
self
.
generate_next_sequence_item
(
'Tuple'
,
result_name
,
code
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment