String representation in erlang

Claes Wikstom klacke@REDACTED
Tue Sep 13 16:16:16 CEST 2005


Thinus Pollard wrote:
> Hi there
> 
> According to the Erlang efficiency guide a string is internally represented as 
> a list of integers, thus consuming 2 words (8 bytes on a 32bit platform) of 
> memory *per* character.
> 
> The attached code is an attempt at reducing the memory footprint of strings in 
> erlang (passing between functions etc etc).
> 

Me thinks you'd be better off using binaries for strings.

/klacke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: klacke.vcf
Type: text/x-vcard
Size: 301 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20050913/20e3a097/attachment.vcf>


More information about the erlang-questions mailing list