3 ms·
It's worth highlighting that the GIL will still be available even when compiled with --disable-gil. > The --disable-gil builds of CPython will still support o
by bsdz 3y ago
It's worth highlighting that the GIL will still be available even when compiled with --disable-gil.
> The --disable-gil builds of CPython will still support optionally running with the GIL enabled at runtime (see PYTHONGIL Environment Variable and Py_mod_gil Slot).
- packetlost 3y agoWhy not do it the other way? Have an opt-in at runtime for no-gil?
- radlad 3y agoBecause in general, removing the GIL should be an improvement.
- gcbirzan 3y agoIn general, until you do use threads, removing the GIL is a performance loss. Even if you do use threads, you have an overhead: https://peps.python.org/pep-0703/#performance https://peps.python.org/pep-0703/#performance
- packetlost 3y agoOh, that makes sense! I forgot that there would be overhead related to the changes for no GIL.