<div dir="ltr"><a href="https://ghc.haskell.org/trac/ghc/ticket/14072">https://ghc.haskell.org/trac/ghc/ticket/14072</a><div><br></div><div>8.2.1 is (marginally) better than 7.8.4 on this benchmark, so I guess 8.4 can be better than 7.10.3.<br><div><br></div><div>-harendra</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 1 August 2017 at 15:42, Simon Peyton Jones <span dir="ltr"><<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div class="m_3345462366478020550WordSection1">
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif">Thanks.  Could you open a Trac ticket, and explain carefully how to reproduce your results?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif">Surely 8.4 should be faster than 7.10!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif">Simon<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> ghc-devs [mailto:<a href="mailto:ghc-devs-bounces@haskell.org" target="_blank">ghc-devs-bounces@<wbr>haskell.org</a>]
<b>On Behalf Of </b>Harendra Kumar<br>
<b>Sent:</b> 01 August 2017 10:46<br>
<b>To:</b> <a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<b>Subject:</b> GHC 8.2 generated code faster than 8.0 but slower than 7.10<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
Unicode normalization library (<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fharendra-kumar%2Funicode-transforms&data=04%7C01%7Csimonpj%40microsoft.com%7Cea675f49b17b45582c5708d4d8c22226%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636371775684809111%7CUnknown%7CVW5rbm93bnx7IlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiT3RoZXIifQ%3D%3D%7C-1&sdata=4YlXVWqT4DKYHpgUcq9YF%2BiX2xH%2BLAHgI4GFCGt6zwg%3D&reserved=0" target="_blank">https://github.com/harendra-<wbr>kumar/unicode-transforms</a>)
 shows around 10% improvement with GHC 8.2.1 when compared to GHC 8.0.1, across most benchmarks. However, it is still somewhat slower when compared to GHC 7.10.3. Here are some results:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
GHC 7.10.3:<br>
<br>
benchmarking unicode-transforms-text/NFD/<wbr>English<br>
time                 4.823 ms   (4.765 ms .. 4.902 ms)<br>
<br>
benchmarking unicode-transforms-text/NFD/<wbr>Devanagari<br>
time                 16.46 ms   (16.24 ms .. 16.78 ms)<br>
<br>
<br>
GHC 8.0.1<br>
<br>
<br>
benchmarking unicode-transforms-text/NFD/<wbr>English<br>
time                 6.330 ms   (6.232 ms .. 6.439 ms)<br>
<br>
benchmarking unicode-transforms-text/NFD/<wbr>Devanagari<br>
time                 18.02 ms   (17.77 ms .. 18.22 ms)<br>
<br>
GHC 8.2.1<br>
<br>
<br>
benchmarking unicode-transforms-text/NFD/<wbr>English<br>
time                 5.659 ms   (5.594 ms .. 5.740 ms)<br>
<br>
benchmarking unicode-transforms-text/NFD/<wbr>Devanagari<br>
time                 16.48 ms   (16.30 ms .. 16.69 ms)<u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
This library has been optimized with an objective to match or better (in some cases it is better) the performance of the equivalent ICU C++ library (compare only decompose normalization). Some of the last hurdles to match the best case of C++ were in the code
 generated by GHC. Also, for GHC 7.10 LLVM generated code is significantly faster than GHC native, I have not yet tested LLVM backend with 8.2.1 so not sure if that too has improved correspondingly.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
I just wanted to share these results with the GHC devs. Thanks for all the good work. Also wondering which specific changes might have caused this improvement.<u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
Thanks,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
Harendra<u></u><u></u></p>
</div>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div>