Measure Object Size Accurately in Python - Sys.GetSizeOf not functioning

前端 未结 6 1972
一向
一向 2020-11-30 12:31

I am trying to accurately/definitively find the size differences between two different classes in Python. They are both new style classes, save for one not having sl

6条回答
  •  鱼传尺愫
    2020-11-30 13:31

    First check the size of the Pyton process in your os' memory manager without many objects.

    Second make many objects of one kind and check the size again.

    Third make many objects of the other kind and check the size.

    Repeat this a few times and if the sizes of each step stay about the same you have got something comparable.

提交回复
热议问题