<br>The strings will not be longer than 30 characters. <br>I am doing sets of 2000  (total of 2000^2 distance computations)<br><br>I am expecting that all the operations will be lazyly performed but at some point I get a memory error.<br>
<br>Most of the memory is being allocated for the hamming distance and I am still unable to find the source of my memory leak.<br><br>Regards,<br><br>Arnoldo<br><br><div class="gmail_quote">On Mon, Apr 19, 2010 at 3:47 PM, Daniel Fischer <span dir="ltr">&lt;<a href="mailto:daniel.is.fischer@web.de">daniel.is.fischer@web.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Am Montag 19 April 2010 14:37:33 schrieb John Lato:<br>
<div class="im">&gt; Is it really necessary to use Strings?  I think a packed type, e.g.<br>
&gt; Vector or ByteString, would be much more efficient here.<br>
<br>
</div>Not very much if the strings are fairly short (and the list isn&#39;t too long,<br>
so there&#39;s not a big difference in cache-friendliness).<br>
If eight-bit characters aren&#39;t enough, packing the strings into<br>
UArray Int Char gives performance quite close to ByteStrings.<br>
<div><div></div><div class="h5"><br>
&gt; Of course this is only likely to be a benefit if you can move away from<br>
&gt; String entirely.<br>
&gt;<br>
&gt; I suspect that &quot;hamming2&quot; would perform better then.<br>
&gt;<br>
&gt; John<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>