<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Apr 27, 2014 at 3:37 PM, Niklas Hambüchen <span dir="ltr"><<a href="mailto:mail@nh2.me" target="_blank">mail@nh2.me</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 27/04/14 23:18, John Lato wrote:> Hmm.  Are you using regular vectors<br>
<div class="">or unboxed? Also what sort of crash?<br>
> Is it a stack space overflow or are you on a 32-bit platform?<br>
<br>
</div>I'm using regular Data.Vector as V.<br></blockquote><div><br></div><div>Are unboxed vectors faster?  My rule of thumb is to use them over Data.Vector whenever possible.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
It's just eating my 8GB and then I kill it (or let my ulimit do it). It<br>
can't be the stack space since I'm on 7.6 where stack space is limited<br>
by default.<br>
<br>
It's on 64 bit Linux.<br>
</blockquote></div><br></div><div class="gmail_extra">I would expect it's because you never force the argument.  With `enumFromTo` the argument is forced because it needs to be checked for termination, but `enumFromN` is probably building up a big chain of thunks.  I guess for this case `enumFromN` has no benefit over `enumFromTo` because the intention is to create a single loop instead of actually allocating the vector, so the warning in the documentation doesn't necessarily apply.</div>
</div>