[erlang-questions] effect of destructive updates on GC implementation

Jonathan Amsterdam <>
Tue Jan 29 23:11:09 CET 2008


> Yes. I would much rather see a development where higher-order
> constructs can be optimized to either use destructive updates
> under the covers, or even transformations like e.g. removing
> unnecessary reverse() calls, or whatever. (*)

How about promises with memoization? That is, a no-argument fun whose
result is cached the first time it is called. This would let you
implement lazy lists, and get the performance bounds of the Okasaki
data structures. E.g. queues with worst-case (not amortized) O(1)
behavior.



More information about the erlang-questions mailing list