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
ae017150
Commit
ae017150
authored
Jun 29, 2017
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Timing test.
A typical speedup for the fast_gil directive is around 35% on this benchmark.
parent
25dec8d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
tests/run/with_gil.pyx
tests/run/with_gil.pyx
+16
-0
No files found.
tests/run/with_gil.pyx
View file @
ae017150
...
...
@@ -458,3 +458,19 @@ def test_nogil_try_finally_error_label():
with
gil
:
print
"print me first"
except
Exception
,
e
:
print
e
.
args
[
0
]
cdef
void
test_timing_callback
()
with
gil
:
pass
def
test_timing
(
long
N
):
"""
>>> sorted([test_timing(10000) for _ in range(10)]) # doctest: +ELLIPSIS
[...]
"""
import
time
t
=
time
.
time
()
with
nogil
:
for
_
in
range
(
N
):
test_timing_callback
()
return
time
.
time
()
-
t
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