6 ms·
Python largely only gets away with ref counting because it doesn't support concurrent access. The GIL means it's basically single-threaded ref counting, which i
by kllrnohj 8y ago
Python largely only gets away with ref counting because it doesn't support concurrent access. The GIL means it's basically single-threaded ref counting, which is much cheaper than an actual atomic ref count (like std::shared_ptr)
Scattering atomic ref counts everywhere gets extremely expensive very quickly.