I did some tests and I can't decide which way is better as both seems to be too simple for more complex loops. I think that saving max memory usage makes more sense but just alittle.

### Saving final memory usage for each line in loop (my version)
```
Increasing memory usage with each iteration.
Line #    Mem usage    Increment   Line Contents
================================================
     3      5.6 MiB      0.0 MiB   @profile
     4                             def up():
     5      5.6 MiB      0.0 MiB       a = []
     6      9.4 MiB      3.8 MiB       for x in xrange(7):
     7      9.4 MiB      0.0 MiB           a = [1] * 10 ** x
     8      9.4 MiB      0.0 MiB       print 'done'

Decreasing memory usage with each iteration
Line #    Mem usage    Increment   Line Contents
================================================
     3      5.6 MiB      0.0 MiB   @profile
     4                             def down():
     5      5.6 MiB      0.0 MiB       a = []
     6      5.6 MiB      0.0 MiB       for x in xrange(7):
     7      5.6 MiB      0.0 MiB           a = [1] * 10 ** (7 - x)
     8      5.6 MiB      0.0 MiB       print 'done'

Increasing then decreasing again
Line #    Mem usage    Increment   Line Contents
================================================
     3      5.6 MiB      0.0 MiB   @profile
     4                             def up_down():
     5      5.6 MiB      0.0 MiB       a = []
     6      5.6 MiB      0.0 MiB       for x in xrange(7):
     7      5.6 MiB      0.0 MiB   	if x < 3:
     8      5.6 MiB     -0.0 MiB   	    a = [1] * 10 ** x
     9                             	else:
    10      5.6 MiB      0.0 MiB   	    a = [1] * 10 ** (7 - x)
    11      5.6 MiB      0.0 MiB       print 'done'

Decreasing then increasing again
Line #    Mem usage    Increment   Line Contents
================================================
     3      5.6 MiB      0.0 MiB   @profile
     4                             def down_up():
     5      5.6 MiB      0.0 MiB       a = []
     6      9.8 MiB      4.3 MiB       for x in xrange(7):
     7      6.0 MiB     -3.8 MiB   	if x > 3:
     8      9.8 MiB      3.8 MiB   	    a = [1] * 10 ** x
     9                             	else:
    10      5.6 MiB     -4.2 MiB   	    a = [1] * 10 ** (7 - x)
    11      9.8 MiB      4.2 MiB       print 'done'
```

### Saving max memory usage for each line (as you suggested)
```
Increasing memory usage with each iteration.
Line #    Mem usage    Increment   Line Contents
================================================
    23      5.6 MiB      0.0 MiB   @profile
    24                             def up():
    25      5.6 MiB      0.0 MiB       a = []
    26      9.4 MiB      3.8 MiB       for x in xrange(7):
    27      9.4 MiB      0.0 MiB   	a = [1] * 10 ** x
    28      9.4 MiB      0.0 MiB       print 'done'

Decreasing memory usage with each iteration
Line #    Mem usage    Increment   Line Contents
================================================
    30      5.6 MiB      0.0 MiB   @profile
    31                             def down():
    32      5.6 MiB      0.0 MiB       a = []
    33     43.7 MiB     38.1 MiB       for x in xrange(7):
    34     43.7 MiB      0.0 MiB   	a = [1] * 10 ** (7 - x)
    35      5.6 MiB    -38.1 MiB       print 'done'  

Increasing then decreasing again
Line #    Mem usage    Increment   Line Contents
================================================
     3      5.6 MiB      0.0 MiB   @profile
     4                             def up_down():
     5      5.6 MiB      0.0 MiB       a = []
     6     43.7 MiB     38.1 MiB       for x in xrange(7):
     7     43.7 MiB      0.0 MiB   	if x > 3:
     8      9.8 MiB    -33.9 MiB   	    a = [1] * 10 ** x
     9                             	else:
    10     43.7 MiB     33.9 MiB   	    a = [1] * 10 ** (7 - x)
    11      9.8 MiB    -33.9 MiB       print 'done'

Decreasing then increasing again
Line #    Mem usage    Increment   Line Contents
================================================
    13      5.6 MiB      0.0 MiB   @profile
    14                             def down_up():
    15      5.6 MiB      0.0 MiB       a = []
    16     43.7 MiB     38.1 MiB       for x in xrange(7):
    17     43.7 MiB      0.0 MiB   	if x > 3:
    18      9.8 MiB    -33.9 MiB   	    a = [1] * 10 ** x
    19                             	else:
    20     43.7 MiB     33.9 MiB   	    a = [1] * 10 ** (7 - x)
    21      9.8 MiB    -33.9 MiB       print 'done'
```