Vladimir

3%
Flag icon
The references to the items in a tuple are stored in an array in the tuple struct, while a list holds a pointer to an array of references stored elsewhere. The indirection is necessary because when a list grows beyond the space currently allocated, Python needs to reallocate the array of references to make room. The extra indirection makes CPU caches less effective.
Fluent Python: Clear, Concise, and Effective Programming
Rate this book
Clear rating
Open Preview