Commit 46bbda13 authored by gabrieldemarmiesse's avatar gabrieldemarmiesse

moved a small example from the "profiling tutorial" to the examples directory.

parent 084a25f5
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