[erlang-questions] lists, binaries or something else?

CGS cgsmcmlxxv@REDACTED
Thu Jul 12 14:46:34 CEST 2012


Hi,

I am trying to find a balance in between processing speed and RAM
consumption for sets of large strings (over 1 M characters per string). To
construct such lists is much faster than constructing its binary
counterpart. On the other hand, lists are using more RAM than binaries, and
that reduces the number of strings I can hold in memory (unless I transform
the lists in binaries and call GC after that, but that slows down the
processing time). Has anyone had this problem before? What was the
solution? Thoughts?

A middle way in between lists and binaries is using tuples, but handling
them is not as easy as in the case of lists or binaries, especially at
variable tuple size. Therefore, working with tuples seems not a good
solution. But I might be wrong, so, if anyone used tuples in an efficient
way for this case, please, let me know.

Any thought would be very much appreciated. Thank you.

CGS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120712/fcfec466/attachment.htm>


More information about the erlang-questions mailing list