AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
The Pros and Cons of a Global Interpreter Lock in Python
Python uses reference counting for garbage collection, right? We don't have an actual garbage collector that does like traces and long pointers. So we're very every time you make an assignment, it increments a counter on that object. The problem is if you put a little lock on every single object, your performance sucks,. Because that's a lot of lock in an unlocking and no one wants to put up with that.