Search code examples
python-3.xtime-complexityramspace-complexitymemory-consumption

Memory usage of a function in Python 3.x


Are there any specific Python libraries to quantify practically both space (memory consumption) and time complexity (time consumption) of a specific function in Python 3.x, by providing avg/max/min stats?


Solution

  • You can find the memory usage of a process using the os and psutil libraries according to the answer given here.