<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Ryan Newton:</div><blockquote type="cite"><div class="gmail_quote"><div>But, anyway, it turns out that my example above&nbsp;<b>is easily transformed from a bad GHC performance story into a good one</b>. &nbsp;If you'll bear with me, I'll show how below.</div><div>&nbsp; &nbsp;First,&nbsp;Manuel makes a good point about the LLVM backend. &nbsp;My "6X" anecdote was from a while ago and I didn't use llvm [1]. &nbsp;I redid it just now with 7.4.1+LLVM, results below. &nbsp;(The below table should read correctly in fixed width font, <a href="https://docs.google.com/spreadsheet/ccc?key=0AvzAHqQmHo87dHU0T0lCb1I4MFJmM2s4RnNlamJlNkE">but you can also see the data in the spreadsheet here</a>.)</div>

<div><br></div><div><div><font face="'courier new', monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Time (ms) &nbsp;&nbsp;Compiled File size &nbsp; Comple+Runtime (ms)</font></div><div><font face="'courier new', monospace">GHC 7.4.1 O0<span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp; &nbsp;2444<span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp; &nbsp; &nbsp; &nbsp;1241K<span class="Apple-tab-span" style="white-space:pre">        </span></font></div>

<div><font face="'courier new', monospace">GHC 7.4.1 O2<span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp; &nbsp;925<span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp; &nbsp; &nbsp; &nbsp;1132K<span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;1561</font></div>

<div><font face="'courier new', monospace">GHC 7.4.1 O2 llvm &nbsp;931 &nbsp; &nbsp; &nbsp; &nbsp; 1133K</font></div><div><font face="'courier new', monospace">GHC 7.0.4 O2 via-C 684 &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;974K</font></div></div><div><br></div>
<div>
<div>So LLVM didn't help [1]. &nbsp;And in fact the deprecated via-C backend did the best! &nbsp;</div></div></div></blockquote><div><br></div>I would classify that as a bug.<br><div><br></div><blockquote type="cite"><div class="gmail_quote"><div>[1] P.P.S. Most concerning to me about Haskell/C++ comparisons are&nbsp;David Peixotto's findings that LLVM optimizations are not very effective on Haskell-generated LLVM compared with typical clang-generated LLVM.</div></div></blockquote><div><br></div></div>There is some work underway to improve the situation, but I am sure more could be done.<div><br></div><div>Manuel</div><div><br></div></body></html>