On Wed, Jan 19, 2011 at 4:44 PM, Bas van Dijk <span dir="ltr">&lt;<a href="mailto:v.dijk.bas@gmail.com">v.dijk.bas@gmail.com</a>&gt;</span> wrote:<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Does newUniqueSTM give you a performance advantage in a STM transaction? Or is it just a convenience that you don&#39;t need to use unsafeIOToSTM?<br></blockquote><div><br></div><div>It is more than a convenience, because I can&#39;t actually use unsafeIOToSTM on any IO action that internally uses atomically. Nesting &#39;atomically&#39; results in the runtime system shutting down, because it has no way to backtrack and retry STM computations when they are nested. This is a consequence rather all out of proportion to the act of asking for a fresh identifier. ;)</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Because of the slightly simpler implementation and slightly better performance I&#39;m for reverting to IORefs.<br></blockquote><div><br></div><meta charset="utf-8"><div>Switching back to IORefs would be my preferred solution as well.</div>
<div> </div><div>-Edward Kmett</div></div>