Performance of send_message()

Scott Lystig Fritchie scott@REDACTED
Sat Aug 5 07:49:09 CEST 2000


>>>>> "jh" == James Hague <jhague@REDACTED> writes:

jh> The disadvantage is that data passed between processes has to be
jh> copied, which can be bad in some situations.

It's worth noting that the contents of binary objects are not copied
to the recipient's heap.  A binary pointer object is copied to the
recipient's heap, but the binary object's data itself is not, making
the size of the copied object constant.  The object's data is
reference counted and deallocated when the last pointer object is
GC'ed into oblivion.

A someone who has, for hours and days on end, many megabytes per
second entering the Erlang VM via TCP and UDP, being passed to half a
dozen different Erlang processes, and then spit out again (also at
many MB/s :-), the binary data type's relative efficiency is
appreciated.  Our very first prototype was written before the network
drivers could deal with data inside binaries -- we were lucky to be
able to get 100KB/s throughput.

-Scott



More information about the erlang-questions mailing list