Python  1.0
Functions
deeper Namespace Reference

The deep_getsizeof() function drills down recursively and calculates the actual memory usage of a Python object graph. More...

Functions

def deep_compare (a, b, pointer='/')
 
def x (pointer, reason, extra)
 
def compare (a, b)
 
def deep_getsizeof (o, ids)
 

Detailed Description

The deep_getsizeof() function drills down recursively and calculates the actual memory usage of a Python object graph.

See also
https://code.tutsplus.com/tutorials/understand-how-much-memory-your-python-objects-use–cms-25609
https://github.com/the-gigi/deep/blob/master/deeper.py#L80

Function Documentation

◆ compare()

def deeper.compare (   a,
  b 
)

References deep_compare().

◆ deep_compare()

def deeper.deep_compare (   a,
  b,
  pointer = '/' 
)

References x().

Referenced by compare().

◆ deep_getsizeof()

def deeper.deep_getsizeof (   o,
  ids 
)
Find the memory footprint of a Python object

This is a recursive function that drills down a Python object graph
like a dictionary holding nested ditionaries with lists of lists
and tuples and sets.

The sys.getsizeof function does a shallow size of only. It counts each
object inside a container as pointer only regardless of how big it
really is.

:param o: the object
:param ids:
:return:

Referenced by _04d_sieve.main().

◆ x()

def deeper.x (   pointer,
  reason,
  extra 
)

Referenced by deep_compare().