
When working with data structures, you may want to analyse the space complexity of a particular object. For example, you want to compare the size of a sparse matrix and a dense matrix which represent the same data. With python, “Just use sys.getsizeof” is not a complete answer. It does work for builtin objects directly, but it does not account for what those objects may...