[Haskell-cafe] Testing of GHC extensions & optimizations

Ömer Sinan Ağacan omeragacan at gmail.com
Sat Sep 1 11:31:32 UTC 2018


Here are a few things we do regarding compiler/runtime performance:

- Each commit goes through some set of tests, some of which also check max.
  residency, total allocations etc. of the compiler or the compiled program,
  and fail if those numbers are more than the allowed amount. See [1] for an

- There's https://perf.haskell.org/ghc/ which does some testing on every
  commit. I don't know what exactly it's doing (hard to tell from the web page,
  but I guess it's only running a few select tests/benchmarks?). I've
  personally never used it, I just know that it exists.

- Most of the time if a patch is expected to change compiler or runtime
  performance the author submits nofib results and updates the perf tests in the
  test suite for new numbers. This process is manual and sometimes contributors
  are asked for nofib numbers by reviewers etc. See [2,3] for nofib.

We currently don't use random testing.

[1]: https://github.com/ghc/ghc/blob/565ef4cc036905f9f9801c1e775236bb007b026c/testsuite/tests/perf/compiler/all.T#L30
[2]: https://github.com/ghc/nofib
[3]: https://ghc.haskell.org/trac/ghc/wiki/Building/RunningNoFib


Rodrigo Stevaux <roehst at gmail.com>, 31 Ağu 2018 Cum, 20:54 tarihinde şunu yazdı:
> Hi,
> For those familiar with GHC source code & internals, how are extensions & optimizations tested? And what are the quality policies for accepting new code into GHC?
> I am interested in testing compilers in general using random testing. Is it used on GHC?
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.

More information about the Haskell-Cafe mailing list