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

Ulf Wiger (TN/EAB) ulf.wiger@REDACTED
Tue Jan 29 22:41:59 CET 2008

Mikael Pettersson skrev:

>    The runtime cost of the write-barrier is a non-issue,
>    since writes can be expected to be rare. Erlang is not
>    Java, thankfully.

Well, rare overall, but isn't it reasonable to assume
that, in the places where destructive updates are used,
they might used with high frequency and high demands on

> 2. As soon as destructive updates are supported, people
>    will use them. From what I've heard from Ericsson folks,
>    the lack of destructive updates is actually a positive
>    thing for them, presumably due to program reliability and
>    programmer productivity.

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. (*)

The latest improvements in bit syntax are exactly the kind
of optimizations that I like the best - making the most
preferred style of programming also be the most efficient!

Ulf W

(*) Just an example. I don't know if that particular
optimization would give very much.

More information about the erlang-questions mailing list