Commit c4a5fefd authored by scoder's avatar scoder Committed by GitHub

Merge pull request #2404 from gabrieldemarmiesse/test__profiling_tutorial_6

Added tests to "profiling tutorial" part 6
parents b9975566 46bbda13
cimport cython
@cython.profile(False)
def my_often_called_function():
pass
...@@ -44,14 +44,9 @@ If your profiling is messed up because of the call overhead to some small ...@@ -44,14 +44,9 @@ If your profiling is messed up because of the call overhead to some small
functions that you rather do not want to see in your profile - either because functions that you rather do not want to see in your profile - either because
you plan to inline them anyway or because you are sure that you can't make them you plan to inline them anyway or because you are sure that you can't make them
any faster - you can use a special decorator to disable profiling for one any faster - you can use a special decorator to disable profiling for one
function only:: function only:
cimport cython
@cython.profile(False)
def my_often_called_function():
pass
.. literalinclude:: ../../examples/tutorial/profiling_tutorial/often_called.pyx
Enabling line tracing Enabling line tracing
--------------------- ---------------------
......
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