4 ms·
An aside: Tolpin and Toft designed an extension to the functional language ML which used region based memory managed instead of traditional garbage collection
by dumael 10y ago
An aside:
Tolpin and Toft designed an extension to the functional language ML which used region based memory managed instead of traditional garbage collection for ML.
This lifted the lifetimes of variables into ML's type system (!!!) while the underlying implementation IIRC could achieve O(1) memory behaviour except when an exception occurred.
While this sounds amazing, there were draw-backs on the implementation / theory as certain optimisations were near necessary to get good performance. I.E. word sized integers had to live in the heap as opposed to registers. Another issue was that loops had to be restructured from idiomatic ML style to a slightly different one, other the region inference logic would cause O(N) allocations in a loop which would otherwise use O(1) allocations.
http://www.elsman.com/pdf/retro.pdf http://www.elsman.com/pdf/retro.pdf
or "Tauplin and Toft region based memory management retrospective" should lead you to the paper.