Commit ae017150 authored by Robert Bradshaw's avatar Robert Bradshaw

Timing test.

A typical speedup for the fast_gil directive is around 35% on this benchmark.
parent 25dec8d1
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment