On 07/09/06, <b class="gmail_sendername">Jeff Crane</b> <<a href="mailto:jefcrane@yahoo.com">jefcrane@yahoo.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am trying to implement a 2d map in erlang where<br>dynamic elements will be traversing it via reference.<br>I have no other way to get the "locations" into memory<br>other than using a large array, explicitly for
<br>reading.</blockquote><div><br>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.<br><a href="http://www.erlang.org/doc/doc-5.5.1/lib/stdlib-1.14.1/doc/html/ets.html">
http://www.erlang.org/doc/doc-5.5.1/lib/stdlib-1.14.1/doc/html/ets.html</a><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have heard of a "binary" format in erlang that is
<br>used for this kind of read-without-copy on large<br>amounts of data. </blockquote><div><br>Have you seen this?<br><a href="http://www.erlang.org/doc/doc-5.5.1/doc/programming_examples/bit_syntax.html#4">http://www.erlang.org/doc/doc-5.5.1/doc/programming_examples/bit_syntax.html#4
</a> <br><br>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.<br></div></div><br>cheers<br>Chandru<br><br>