I have a python list, which consists of 80000 lists. Each of these inner lists more or less have this format:
["012345", "MYNAME" "Mon", "A", 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20]
Could you tell approximately how much memory would this list consisting of 80000 lists consume?
And is it common/OK to use and operate on lists that big in python? Most of the operations I do is to extract data from this list with list comprehension method.
Actually, what I would like to learn is: is python fast enough to extract data from that big lists using list comprehension methods. I want my script to be fast
As per the code in
sysmodule.cit looks like it calls__sizeof__method to get the size of an object.and then adds some
gcoverhead to it:We can also use the
recursive sizeof recipeas suggested in docs to recursively calculate the size of each container: