Commit 08f33ef7 authored by Julien Jerphanion's avatar Julien Jerphanion Committed by GitHub

docs: Add a Performance section for Typed Memoryviews (GH-4464)

Originally discussed here:
https://groups.google.com/g/cython-users/c/rU0_mt3Vgn0
parent b75af38c
......@@ -660,6 +660,16 @@ object handling. For the details of how to compile and
call functions in C files, see :ref:`using_c_libraries`.
Performance: Disabling initialization checks
============================================
Every time the memoryview is accessed, Cython adds a check to make sure that it has been initialized.
If you are looking for performance, you can disable them by setting the
``initializedcheck`` directive to ``False``.
See: :ref:`compiler-directives` for more information about this directive.
.. _GIL: https://docs.python.org/dev/glossary.html#term-global-interpreter-lock
.. _NumPy: https://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html#memory-layout
.. _example: https://docs.scipy.org/doc/numpy/reference/arrays.indexing.html
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