

Python memory usage of common types - derwiki
http://www.valuedlessons.com/2008/10/blog-post.html

======
apu
For large collections of homogenous values, using the array or struct modules
is best for memory (and often for speed as well).

Or if math is needed, then numpy arrays are best.

Storing homogenous data in lists/tuples is fine if performance/memusage is not
critical, or for small collections (i.e., 90% of use-cases).

------
yangyang
It's not mentioned in this article, but Python 2.6 objects have a __sizeof__
method, used by sys.getsizeof():

    
    
      >>> help(sys.getsizeof)
      Help on built-in function getsizeof in module sys:
    
      getsizeof(...)
        getI(object, default) -> int
    
        Return the size of object in bytes.
    
    

<http://bugs.python.org/issue2898>

------
abecedarius
This boggled me a bit until I noticed it's a 64-bit system. So an int takes 3
words, which sounds more reasonable.

