Add __slots__ to the Coord class.
This further reduces memory usage for large inputs (#72)
diff --git a/z.py b/z.py
index 33cbf4d..5b25120 100644
--- a/z.py
+++ b/z.py
@@ -76,6 +76,8 @@
def heapyprofile():
+ # pip install guppy
+ # [works on python 2.7, AFAIK]
from guppy import hpy
import gc
@@ -83,7 +85,7 @@
ast = parse_file('/tmp/197.c')
gc.collect()
h = hp.heap()
- print h
+ print(h)
def memprofile():
@@ -109,8 +111,8 @@
}
'''
- #memprofile()
- heapyprofile()
+ memprofile()
+ #heapyprofile()
#parser = CParser()
#ast = parser.parse(source_code, filename='zz')