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
Boxiang Sun
cython
Commits
72b5113a
Commit
72b5113a
authored
9 years ago
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
speed up __Pyx_PySet_Update() a little by calling it as an unbound method
parent
53eb0a27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+1
-1
Cython/Utility/Builtins.c
Cython/Utility/Builtins.c
+1
-1
No files found.
Cython/Compiler/Code.py
View file @
72b5113a
...
...
@@ -438,7 +438,7 @@ class UtilityCode(UtilityCodeBase):
replacements.append(cname)
return '%s(&%s, %s)' % (call, cname, ', '.join(args))
impl = re.sub(r'CALL_UNBOUND_METHOD
\
(([
a
-zA-Z_]+),
\
s*
"
([^"
]
+
)
"(
,
\
s*[^),]+)+
\
)', externalise, impl)
impl = re.sub(r'CALL_UNBOUND_METHOD
\
(([
a
-zA-Z_]+),
\
s*
"
([^"
]
+
)
"(
(?:,
\
s*[^),]+)+)
\
)', externalise, impl)
assert 'CALL_UNBOUND_METHOD(' not in impl
return bool(replacements), impl
...
...
This diff is collapsed.
Click to expand it.
Cython/Utility/Builtins.c
View file @
72b5113a
...
...
@@ -477,7 +477,7 @@ static CYTHON_INLINE int __Pyx_PySet_Update(PyObject* set, PyObject* it) {
Py_DECREF
(
retval
);
}
#endif
retval
=
__Pyx_PyObject_CallMethod1
(
set
,
PYIDENT
(
"update"
)
,
it
);
retval
=
CALL_UNBOUND_METHOD
(
PySet_Type
,
"update"
,
set
,
it
);
if
(
unlikely
(
!
retval
))
return
-
1
;
Py_DECREF
(
retval
);
return
0
;
...
...
This diff is collapsed.
Click to expand it.
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