Initial compile time benchmarks

Eric Seidel eric at seidel.io
Tue Mar 29 21:24:29 UTC 2016


Very cool!

It would be nice to add build flags to the table (or at least
optimization levels) as these probably differ across packages, and will
certainly impact the numbers. 

I'd also be really interested to see a comparison of the timing data for
-O0 and -O. I think the biggest impact for performance improvements will
probably come from working on -O0, since that's what people will use for
development.

Thanks!
Eric

On Tue, Mar 29, 2016, at 14:00, Ömer Sinan Ağacan wrote:
> 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:
> 
> https://gist.githubusercontent.com/osa1/fd82335181a584679c9f3200b7b0a8a5/raw/5d46b0e7006c7ef9fae913f7d6932b74c83835f1/gistfile1.txt
> 
> 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:
> 
>     ======================Total======================
>     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
> useful.
> 
> 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.
> 
> ---
> 
> [^1]: https://phabricator.haskell.org/D1959
> [^2]: https://github.com/osa1/analyze-ghc-timings
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


More information about the ghc-devs mailing list