<br><br><div class="gmail_quote">On Thu, Mar 4, 2010 at 11:10 AM, Don Stewart <span dir="ltr"><<a href="mailto:dons@galois.com">dons@galois.com</a>></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;">
cjs:<br>
<div class="im">> On 2010-03-01 19:37 +0000 (Mon), Thomas Schilling wrote:<br>
><br>
> > A possible workaround would be to sprinkle lots of 'rnf's around your<br>
> > code....<br>
><br>
> As I learned rather to my chagrin on a large project, you generally<br>
> don't want to do that. I spent a couple of days writing instance<br>
> of NFData and loading up my application with rnfs and then watched<br>
> performance fall into a sinkhole.<br>
><br>
> I believe that the problem is that rnf traverses the entirety of a large<br>
> data structure even if it's already strict and doesn't need traversal.<br>
> My guess is that doing this frequently on data structures (such as Maps)<br>
> of less than tiny size was blowing out my cache.<br>
<br>
</div>And rnf will do the traversal whether it is needed or not.<br>
Imo, it is better to ensure the structures you want are necessarily<br>
strict by definition, so that only the minimum additional evaluation is<br>
necessary.<br></blockquote><div><br>Isn't the downside of strict structures the implicit nature of the 'strictification'? You lose the fine grained control of when particular values should be strict.<br><br>
Jason<br></div></div>