4 ms·
Effectively the GIL is incurring that overhead on every data structure whether you need it or not. But with it removed, you'll have to think about it in your d
by ska 3y ago
Effectively the GIL is incurring that overhead on every data structure whether you need it or not.
But with it removed, you'll have to think about it in your designs more than currently. History shows us this is not easy.
- FartyMcFarter 3y ago> Effectively the GIL is incurring that overhead on every data structure whether you need it or not. Not really. The GIL is taken and released quite infrequently (only when the Python interpreter decides it's time to do a context switch), whilst the new locks for each data structure are taken/released every time you do a basic operation on those data structures. Holding a lock that is rarely taken/released incurs very little overhead.
- ska 3y agoHm, that’s a fair point, it’s only some of the same overhead because it’s not per operation.