|
TODO Move content from [CompilerPerformance](compiler-performance) |
|
TODO Move content from [CompilerPerformance](compiler-performance)
|
|
\ No newline at end of file |
|
|
|
|
|
|
|
|
|
This is where we track various efforts to characterize and improve the performance of the compiler itself. If you are concerned about the performance of code generated by GHC, see \[[Performance/Runtime](performance/runtime)\].
|
|
|
|
|
|
|
|
## tests/perf/compiler\` results
|
|
|
|
|
|
|
|
### 7.6 vs 7.8
|
|
|
|
|
|
|
|
- A bit difficult to decipher, since a lot of the stats/surrounding numbers were totally rewritten due to some Testsuite API overhauls.
|
|
|
|
- The results are a mix; there are things like `peak_megabytes_allocated` being bumped up a lot, but a lot of them also had `bytes_allocated` go down as well. This one seems pretty mixed.
|
|
|
|
|
|
|
|
### 7.8 vs 7.10
|
|
|
|
|
|
|
|
- Things mostly got **better** according to these, not worse!
|
|
|
|
- Many of them had drops in `bytes_allocated`, for example, `T4801`.
|
|
|
|
- The average improvement range is something like 1-3%.
|
|
|
|
- But one got much worse; `T5837`'s `bytes_allocated` jumped from 45520936 to 115905208, 2.5x worse!
|
|
|
|
|
|
|
|
### 7.10 vs HEAD
|
|
|
|
|
|
|
|
- Most results actually got **better**, not worse!
|
|
|
|
- Silent superclasses made HEAD drop in several places, some noticeably over 2x
|
|
|
|
|
|
|
|
- `max_bytes_used` increased in some cases, but not much, probably GC wibbles.
|
|
|
|
- No major regressions, mostly wibbles.
|
|
|
|
|
|
|
|
## Compile/build times
|
|
|
|
|
|
|
|
|
|
|
|
(NB: Sporadically updated)
|
|
|
|
|
|
|
|
**As of April 22nd**:
|
|
|
|
|
|
|
|
- GHC HEAD: 14m9s (via 7.8.3) (because of Joachim's call-arity improvements)
|
|
|
|
- GHC 7.10: 15m43s (via 7.8.3)
|
|
|
|
- GHC 7.8: 12m54s (via 7.8.3)
|
|
|
|
- GHC 7.6: 8m19s (via 7.4.1)
|
|
|
|
|
|
|
|
|
|
|
|
Random note: GHC 7.10's build system actually disabled DPH (half a dozen more packages and probably a hundred extra modules), yet things \*still\* got slower over time!
|
|
|
|
|
|
|
|
## Performance-related tickets
|
|
|
|
|
|
|
|
|
|
|
|
Relevant tickets
|
|
|
|
|
|
|
|
- [\#10370](https://gitlab.haskell.org//ghc/ghc/issues/10370): OpenGLRaw
|
|
|
|
- [\#10289](https://gitlab.haskell.org//ghc/ghc/issues/10289): 2.5k static HashSet takes too much memory to compile
|
|
|
|
|
|
|
|
- Significantly improved in memory usage from [\#10370](https://gitlab.haskell.org//ghc/ghc/issues/10370), but worse at overall wall-clock time!
|
|
|
|
- [\#9583](https://gitlab.haskell.org//ghc/ghc/issues/9583), [\#9630](https://gitlab.haskell.org//ghc/ghc/issues/9630): code blowup in Generics/Binary
|
|
|
|
- [\#10228](https://gitlab.haskell.org//ghc/ghc/issues/10228): regression from 7.8.4 to 7.10.1
|
|
|
|
- [\#7428](https://gitlab.haskell.org//ghc/ghc/issues/7428): Non-linear compile time: addFingerprint??
|
|
|
|
|
|
|
|
- Still a huge problem with GHC 7.10.1: looks like quadratic behavior around `TidyCore`/`CorePrep`.
|
|
|
|
- [\#2346](https://gitlab.haskell.org//ghc/ghc/issues/2346): desugaring let-bindings
|
|
|
|
- [\#10491](https://gitlab.haskell.org//ghc/ghc/issues/10491): Huge explosion in compilation time for `Accelerate`
|
|
|
|
|
|
|
|
[ https://ghc.haskell.org/trac/ghc/query?status=!closed&failure=Runtime+performance+bug&type=bug](https://ghc.haskell.org/trac/ghc/query?status=!closed&failure=Runtime+performance+bug&type=bug)
|
|
|
|
|
|
|
|
## Compile time
|
|
|
|
|
|
|
|
- [\#9557](https://gitlab.haskell.org//ghc/ghc/issues/9557): Deriving instances is slow
|
|
|
|
- [\#8731](https://gitlab.haskell.org//ghc/ghc/issues/8731): long compilation time for module with large data type and partial record selectors
|
|
|
|
- [\#7258](https://gitlab.haskell.org//ghc/ghc/issues/7258): Compiling DynFlags is jolly slow
|
|
|
|
- [\#7450](https://gitlab.haskell.org//ghc/ghc/issues/7450): Regression in optimisation time of functions with many patterns (6.12 to 7.4)?
|
|
|
|
|
|
|
|
- [ Phab:D1041](https://phabricator.haskell.org/D1041), [ Phab:D1012](https://phabricator.haskell.org/D1012)
|
|
|
|
- Unnecessary recomputation of free variables ([ Phab:D1012](https://phabricator.haskell.org/D1012))
|
|
|
|
- Thunk leak in `Bitmap` ([ Phab:D1040](https://phabricator.haskell.org/D1040))
|
|
|
|
- [\#9669](https://gitlab.haskell.org//ghc/ghc/issues/9669): Long compile time/high memory usage for modules with many deriving clauses
|
|
|
|
|
|
|
|
[ https://ghc.haskell.org/trac/ghc/query?status=!closed&failure=Compile-time+performance+bug](https://ghc.haskell.org/trac/ghc/query?status=!closed&failure=Compile-time+performance+bug) |
|
|
|
\ No newline at end of file |