[erlang-questions] term_to_binary and message passing
Thu Dec 28 16:02:27 CET 2006
On 12/28/06, Joel Reymont <joelr1@REDACTED> wrote:
> junior:~ joelr$ erl
> Erlang (BEAM) emulator version 5.5 [source] [async-threads:0] [hipe]
> Eshell V5.5 (abort with ^G)
> 1> size(term_to_binary(0.2)).
> Does this mean that any float I send within the VM will result in a
> 33-byte message?
> Thanks, Joel
This is the size (with an extra tag byte added) of the float in
Erlangs external format which is used
in the communication between Erlang-nodes.
Internally within one VM the float will be represented with 3 words which means
12 bytes in a VM built for a 32 bit processor.
Thus in internal message passing within a VM the float occupies 12 bytes.
If the VM is BUILT for a 64 bit processor it will use twice as much
i.e 24 bytes.
> erlang-questions mailing list
More information about the erlang-questions