Python Dicts vs. Lists: Ref Counting Performance Gap

Dictionary packing generally incurs higher reference counting overhead compared to list construction due to the additional computational steps required for hashing keys and managing key-value pairs, leading to comparatively slower creation times for large collections.

Sources

Open the full topic