wise binary tails?
Henning Diedrich
hd2010@REDACTED
Wed May 12 19:56:14 CEST 2010
If I have code like this:
traverse(<<Bar:24, Rest>>) -> [ Bar | traverse(Rest) ];
traverse(<<>>) -> [].
traverse(FooBin).
- or -
[ Bar || <<Bar:24>> <= FooBin ].
is Erlang internally doing the wise thing of simply shifting a pointer
into the low level buffer where FooBin is stored.
And thus avoids copying the rest of the buffer again and again?
Thanks!
Henning
More information about the erlang-questions
mailing list