Commit a70b1860 authored by Stefan Behnel's avatar Stefan Behnel

Mark the first creation of a memory view slice as "unlikely()" to ask the C...

Mark the first creation of a memory view slice as "unlikely()" to ask the C compiler to optimise for the repeated re-use case (usually in loops).
parent 87620750
......@@ -494,7 +494,7 @@ __Pyx_INC_MEMVIEW({{memviewslice_name}} *memslice, int have_gil, int lineno)
first_time = __pyx_add_acquisition_count(memview) == 0;
if (first_time) {
if (unlikely(first_time)) {
if (have_gil) {
Py_INCREF((PyObject *) memview);
} else {
......
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