<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Feb 9, 2012, at 2:17 PM, Sean Kelly wrote:</div><blockquote type="cite"><div><br><blockquote type="cite">Best first order optimization would be to allocate the list node deterministically.<br></blockquote><br>Neat idea. I think I can make that change fairly trivially.</div></blockquote></div><br><div><font class="Apple-style-span" face="'Courier New'">$ time abc<br><br>real<span class="Apple-tab-span" style="white-space:pre"> </span>0m0.556s<br>user<span class="Apple-tab-span" style="white-space:pre"> </span>0m0.555s<br>sys<span class="Apple-tab-span" style="white-space:pre"> </span>0m0.001s</font></div><div><br></div><div>So another 100ms improvement. Switching to a (__gshared, no mutex) free-list that falls back on malloc yields:</div><div><br></div><div><div><font class="Apple-style-span" face="'Courier New'">$ time abc</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">real<span class="Apple-tab-span" style="white-space:pre"> </span>0m0.505s</font></div><div><font class="Apple-style-span" face="'Courier New'">user<span class="Apple-tab-span" style="white-space:pre"> </span>0m0.503s</font></div><div><font class="Apple-style-span" face="'Courier New'">sys<span class="Apple-tab-span" style="white-space:pre"> </span>0m0.001s</font></div></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div>Not as much of a gain there, and I believe we've eliminated all the allocations (though I'd have to do a pile build to verify). Still, that's approaching being twice as fast as before, which is definitely something.</div></body></html>