[erlang-questions] 2D Map Arrays

Chandru chandrashekhar.mullaparthi@REDACTED
Thu Sep 7 22:56:30 CEST 2006


On 07/09/06, Jeff Crane <jefcrane@REDACTED> wrote:
>
> I am trying to implement a 2d map in erlang where
> dynamic elements will be traversing it via reference.
> I have no other way to get the "locations" into memory
> other than using a large array, explicitly for
> reading.


Umm...I don't quite understand your data structure but have you looked at
ets? It is for storing tuples. You can then lookup rows/cells using either a
key or a match pattern.
http://www.erlang.org/doc/doc-5.5.1/lib/stdlib-1.14.1/doc/html/ets.html

I have heard of a "binary" format in erlang that is
> used for this kind of read-without-copy on large
> amounts of data.


Have you seen this?
http://www.erlang.org/doc/doc-5.5.1/doc/programming_examples/bit_syntax.html#4

Binaries larger than 64 bytes (I think) are referenced to and not copied on
read. Binaries smaller than 64 bytes are copied when exchanged between
processes.

cheers
Chandru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060907/bba44e04/attachment.htm>


More information about the erlang-questions mailing list