I've got a related tool that I built to understand the RAM cost for hidden temporary array allocations using numpy:
https://github.com/ianozsvald/ipython_memory_usage
If folk are interested in "constant %timeit analysis" then maybe they'll be interested in "constant %memit analysis" too?