abstract-algorithm icon indicating copy to clipboard operation
abstract-algorithm copied to clipboard

Improve memory allocation and deallocation strategy.

Open Kesanov opened this issue 7 years ago • 2 comments

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.

Kesanov avatar May 01 '18 20:05 Kesanov

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.

VictorTaelin avatar May 02 '18 12:05 VictorTaelin

For example, here are some descriptions of memory leak scenarios we have due to Haskell's lazy evaluation.

VictorTaelin avatar May 02 '18 12:05 VictorTaelin