> But to this we must add quite a lot of overhead as explained here:
>
> http://groups.google.dk/group/comp.lang.python/msg/4e0f9800c5898334
>
> Using the heuristic there, an integer takes up 32 bytes and an empty
> list takes up 40 bytes! Ugh...
Well that is a lot of space for simple data types.
I also found the following lines interesting:
# Round to nearest multiple of 8 bytes
x = size % 8
if x != 0:
size += 8-x
size = (size + 8)
Say size is 20 (as in the case of an integer). Then x is 4. We do the rest and
size becomes 32, which is not the nearest multiple of 8 bytes. Someone want to
explain this to me? :)
Anyone interested in this should probably read the source
http://mail.python.org/pipermail/python-list/2002-March/135223.html
which I think does a better job of explaining it.
_______________________________________________
viff-devel mailing list (http://viff.dk/)
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk