Open Kesanov opened 6 years ago
I do not understand the problem, or how evaluating 200 shows the problem. I understand some complain about space leaks on this algorithm, but I guess it is not the same thing of space leaks I know from Haskell, so I'd need a more precise explanation.
For example, here are some descriptions of memory leak scenarios we have due to Haskell's lazy evaluation.
The memory representation can become very sparse after while. You can evaluate
200
with--dump
to see for yourself. This memory won't be deallocated until the program ends. Thus huge space leak will occur if we allocate a lot at the beginning...Building the interaction net lazily might be a good idea.