[erlang-questions] idea: service pack one

Bjorn Gustavsson bjorn@REDACTED
Thu Nov 15 16:44:22 CET 2007


"Juan Jose Comellas" <juanjo@REDACTED> writes:

> BTW, is the Erlang VM capable of expanding a binary without copying data if
> there is a contiguous block of memory available? If a feature like this one
> could be added, it would be possible to efficiently append data to a binary
> without resorting to using a list as an intermediate value. Another option
> could be to make the binaries preallocate memory.

In R12B, when you append to a binary the first time memory will be preallocated
so that the next append operation can be done without copying.

There will be a new chapter in the Efficiency Guide about binaries and the
new optimizations.

/Bjorn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list