Initial compile time benchmarks

Ömer Sinan Ağacan omeragacan at
Tue Mar 29 21:00:24 UTC 2016

Hi all,

Using Ben's timing patch [^1], Cabal, and a Haskell program to parse generated
logs [^2], I generated some tables that show compile times of modules in hxt,
haskell-src-exts, lens, and all of their dependencies:

Some notes:

- Modules and passes in modules are sorted.

- At the end of the file you can see the cumulative numbers for the passes. In
  fact, that's a small table so I'm just going to paste it here:

    CodeGen                                    41.32%
    Simplifier                                 34.83%
    Renamer/typechecker                        12.22%
    Desugar                                     2.11%
    CorePrep                                    1.90%
    Demand analysis                             1.44%
    CoreTidy                                    1.35%
    Called arity analysis                       1.10%
    Float inwards                               0.96%
    Common sub-expression                       0.87%
    Parser                                      0.75%
    SpecConstr                                  0.57%
    Specialise                                  0.30%
    Worker Wrapper binds                        0.17%
    Liberate case                               0.12%
    ByteCodeGen                                 0.00%
    Simplify                                    0.00%

I don't know how to make use of this yet, but I thought ghc-devs may find it

As a next thing I'm hoping to add some more `withTiming` calls. The analyze
program can handle nested `withTiming` calls and renders passes as a tree (GHC
HEAD doesn't have nested `withTiming`s so we don't see it in the file above),
so we can benchmark things in more details. I also want to experiment a little
bit with different `force` parameters to `withTiming`. If anyone has any other
ideas I can also try those.



More information about the ghc-devs mailing list