<div dir="ltr"><div>Great! Thanks for y'all putting effort towards performance. It really is crucial</div><div>for developer productivity.</div><div><br></div><div>In the particular case of haskell-src-exts, I found that removing many of the</div><div>more complicated typeclasses from deriving (Data, Generics, etc) brought the</div><div>compilation time way down. IIRC it was pretty drastic, like 40 seconds vs 10</div><div>seconds (that could be just the timing for that one types module though, I</div><div>don't recall).  Could be valuable to investigate exactly what's going on there.</div><div><br></div><div>-Michael</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 29, 2016 at 2:00 PM, Ömer Sinan Ağacan <span dir="ltr"><<a href="mailto:omeragacan@gmail.com" target="_blank">omeragacan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
Using Ben's timing patch [^1], Cabal, and a Haskell program to parse generated<br>
logs [^2], I generated some tables that show compile times of modules in hxt,<br>
haskell-src-exts, lens, and all of their dependencies:<br>
<br>
<a href="https://gist.githubusercontent.com/osa1/fd82335181a584679c9f3200b7b0a8a5/raw/5d46b0e7006c7ef9fae913f7d6932b74c83835f1/gistfile1.txt" rel="noreferrer" target="_blank">https://gist.githubusercontent.com/osa1/fd82335181a584679c9f3200b7b0a8a5/raw/5d46b0e7006c7ef9fae913f7d6932b74c83835f1/gistfile1.txt</a><br>
<br>
Some notes:<br>
<br>
- Modules and passes in modules are sorted.<br>
<br>
- At the end of the file you can see the cumulative numbers for the passes. In<br>
  fact, that's a small table so I'm just going to paste it here:<br>
<br>
    ======================Total======================<br>
    CodeGen                                    41.32%<br>
    Simplifier                                 34.83%<br>
    Renamer/typechecker                        12.22%<br>
    Desugar                                     2.11%<br>
    CorePrep                                    1.90%<br>
    Demand analysis                             1.44%<br>
    CoreTidy                                    1.35%<br>
    Called arity analysis                       1.10%<br>
    Float inwards                               0.96%<br>
    Common sub-expression                       0.87%<br>
    Parser                                      0.75%<br>
    SpecConstr                                  0.57%<br>
    Specialise                                  0.30%<br>
    Worker Wrapper binds                        0.17%<br>
    Liberate case                               0.12%<br>
    ByteCodeGen                                 0.00%<br>
    Simplify                                    0.00%<br>
<br>
I don't know how to make use of this yet, but I thought ghc-devs may find it<br>
useful.<br>
<br>
As a next thing I'm hoping to add some more `withTiming` calls. The analyze<br>
program can handle nested `withTiming` calls and renders passes as a tree (GHC<br>
HEAD doesn't have nested `withTiming`s so we don't see it in the file above),<br>
so we can benchmark things in more details. I also want to experiment a little<br>
bit with different `force` parameters to `withTiming`. If anyone has any other<br>
ideas I can also try those.<br>
<br>
---<br>
<br>
[^1]: <a href="https://phabricator.haskell.org/D1959" rel="noreferrer" target="_blank">https://phabricator.haskell.org/D1959</a><br>
[^2]: <a href="https://github.com/osa1/analyze-ghc-timings" rel="noreferrer" target="_blank">https://github.com/osa1/analyze-ghc-timings</a><br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div><br></div>