One more detail - on 0.29.x it becomes a pessimization in Python 3.10
rather than Python 3.11. So in conclusion
| Python <3.10 | Python 3.10 | Python 3.11 |
Python 3.12b2
-
0.29.x |
I think the detail that was missing is you need to add the `#cython:
fast_gil = True` to enable it.
For me:
Python 3.9 and 3.10 are basically identical (on master)
**test_gil_already_held**
with fast_gil
Running the test...
took 0.175062894821167
without
Running the test...
took 0.1097679138183
Disclaimer: I may be doing something wrong, I did not put a lot of effort
into it.
With the microbenchmark that was offered in the GH issue, I see little
difference.
Use the attached zip file to reproduce yourself.
Change tox.ini to "cython<3" to try 0.29.x.
BTW, in the 0.29.x case, I see no compil
Hi,
I've seen reports that Cython's "FastGIL" implementation (which basically
keeps the GIL state in a thread-local variable) is no longer faster than
CPython's plain GIL implementation in recent Python 3.x versions.
Potentially even slower. See the report in
https://github.com/cython/cython