Hidden Boost: Python's Attribute Lookup Caches

Python internally optimizes repeated attribute access through various caching mechanisms, particularly on type objects, to avoid re-computing the full lookup path for frequently accessed attributes.

Sources

Open the full topic