summaryrefslogtreecommitdiff
path: root/testsuite/tests/perf
Commit message (Collapse)AuthorAgeFilesLines
* testdriver: delete unused waysThomas Miedema2015-04-071-0/+3
| | | | | | | | | And mention more prominently that `-DDEBUG` and tests that call `compiler_stats_num_fields` don't play well together Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D799
* testsuite: fix failing amd64/Windows perf testsAustin Seipp2015-04-031-6/+13
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Refactor the story around switches (#10137)Joachim Breitner2015-03-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This re-implements the code generation for case expressions at the Stg → Cmm level, both for data type cases as well as for integral literal cases. (Cases on float are still treated as before). The goal is to allow for fancier strategies in implementing them, for a cleaner separation of the strategy from the gritty details of Cmm, and to run this later than the Common Block Optimization, allowing for one way to attack #10124. The new module CmmSwitch contains a number of notes explaining this changes. For example, it creates larger consecutive jump tables than the previous code, if possible. nofib shows little significant overall improvement of runtime. The rather large wobbling comes from changes in the code block order (see #8082, not much we can do about it). But the decrease in code size alone makes this worthwhile. ``` Program Size Allocs Runtime Elapsed TotalMem Min -1.8% 0.0% -6.1% -6.1% -2.9% Max -0.7% +0.0% +5.6% +5.7% +7.8% Geometric Mean -1.4% -0.0% -0.3% -0.3% +0.0% ``` Compilation time increases slightly: ``` -1 s.d. ----- -2.0% +1 s.d. ----- +2.5% Average ----- +0.3% ``` The test case T783 regresses a lot, but it is the only one exhibiting any regression. The cause is the changed order of branches in an if-then-else tree, which makes the hoople data flow analysis traverse the blocks in a suboptimal order. Reverting that gets rid of this regression, but has a consistent, if only very small (+0.2%), negative effect on runtime. So I conclude that this test is an extreme outlier and no reason to change the code. Differential Revision: https://phabricator.haskell.org/D720
* Do proper depth checking in the flattener to avoid looping.Richard Eisenberg2015-03-238-95/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements (roughly) the plan put forward in comment:14:ticket:7788, fixing #7788, #8550, #9554, #10139, and addressing concerns raised in #10079. There are some regressions w.r.t. GHC 7.8, but only with pathological type families (like F a = F a). This also (hopefully -- don't have a test case) fixes #10158. Unsolved problems include #10184 and #10185, which are both known deficiencies of the approach used here. As part of this change, the plumbing around detecting infinite loops has changed. Instead of -fcontext-stack and -ftype-function-depth, we now have one combined -freduction-depth parameter. Setting it to 0 disbales the check, which is now the recommended way to get (terminating) code to typecheck in releases. (The number of reduction steps may well change between minor GHC releases!) This commit also introduces a new IntWithInf type in BasicTypes that represents an integer+infinity. This type is used in a few places throughout the code. Tests in indexed-types/should_fail/T7788 indexed-types/should_fail/T8550 indexed-types/should_fail/T9554 indexed-types/should_compile/T10079 indexed-types/should_compile/T10139 typecheck/should_compile/T10184 (expected broken) typecheck/should_compile/T10185 (expected broken) This commit also changes performance testsuite numbers, for the better.
* Add packageName to GHC.Generics.DatatypeOleg Grenrus2015-02-051-0/+1
| | | | | | | | | | | | | | Summary: Added packageName to GHC.Generics.Datatype class definition Reviewers: hvr, dreixel, austin Reviewed By: dreixel, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D631 GHC Trac Issues: #10030
* 32-bit performance wibbles (second attempt)Simon Peyton Jones2015-01-222-7/+13
| | | | | | Updates the performance numbers for 32-bit windows. I tried to do this before with 387f1d1ec, but accidentally included some unrelated changes.
* Revert "32-bit performance wibbles"Simon Peyton Jones2015-01-222-13/+7
| | | | | | | This reverts commit 387f1d1ec334788c3e891e9304d427bc804998f4. Bizarrely, this commit accidentally added libraries/haskell98. So I'll revert it entirely and start again.
* Update a few performance numbersJoachim Breitner2015-01-222-3/+7
| | | | | to have less annoying false negatives on http://perf.ghc.haskell.org/#graph/testsuite/unexpected%20stats
* 32-bit performance wibblesSimon Peyton Jones2015-01-202-7/+13
| | | | Less for GHC, more for Haddock
* Add missing test from previous commit (55199a97)Austin Seipp2015-01-191-0/+7
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Split stripTicks into expression editing and tick collectionPeter Wortmann2015-01-191-0/+10
| | | | | | | | As with stripTicksTop, this is because we often need the stripped expression but not the ticks (at least not right away). This makes a big difference for CSE, see #9961. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Recenter T6048 performance numbersJoachim Breitner2015-01-081-1/+2
|
* Bump haddock.base according to whats observed on ghcspeedJoachim Breitner2015-01-081-1/+2
|
* Compress TypeMap TrieMap leaves with singleton constructor.Edward Z. Yang2015-01-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Suppose we have a handful H of entries in a TrieMap, each with a very large key, size K. If you fold over such a TrieMap you'd expect time O(H). That would certainly be true of an association list! But with TrieMap we actually have to navigate down a long singleton structure to get to the elements, so it takes time O(K*H). The point of a TrieMap is that you need to navigate to the point where only one key remains, and then things should be fast. This is a starting point: we can improve the patch by generalizing the singleton constructor so it applies to CoercionMap and CoreMap; I'll do this in a later commit. Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D606 GHC Trac Issues: #9960
* Major patch to add -fwarn-redundant-constraintsSimon Peyton Jones2015-01-062-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea was promted by Trac #9939, but it was Christmas, so I did some recreational programming that went much further. The idea is to warn when a constraint in a user-supplied context is redundant. Everything is described in detail in Note [Tracking redundant constraints] in TcSimplify. Main changes: * The new ic_status field in an implication, of type ImplicStatus. It replaces ic_insol, and includes information about redundant constraints. * New function TcSimplify.setImplicationStatus sets the ic_status. * TcSigInfo has sig_report_redundant field to say whenther a redundant constraint should be reported; and similarly the FunSigCtxt constructor of UserTypeCtxt * EvBinds has a field eb_is_given, to record whether it is a given or wanted binding. Some consequential chagnes to creating an evidence binding (so that we record whether it is given or wanted). * AbsBinds field abs_ev_binds is now a *list* of TcEvBiinds; see Note [Typechecking plan for instance declarations] in TcInstDcls * Some significant changes to the type checking of instance declarations; Note [Typechecking plan for instance declarations] in TcInstDcls. * I found that TcErrors.relevantBindings was failing to zonk the origin of the constraint it was looking at, and hence failing to find some relevant bindings. Easy to fix, and orthogonal to everything else, but hard to disentangle. Some minor refactorig: * TcMType.newSimpleWanteds moves to Inst, renamed as newWanteds * TcClassDcl and TcInstDcls now have their own code for typechecking a method body, rather than sharing a single function. The shared function (ws TcClassDcl.tcInstanceMethodBody) didn't have much code and the differences were growing confusing. * Add new function TcRnMonad.pushLevelAndCaptureConstraints, and use it * Add new function Bag.catBagMaybes, and use it in TcSimplify
* Updaete perf numbers for 32-bit machinesSimon Peyton Jones2015-01-061-9/+20
|
* Eliminate so-called "silent superclass parameters"Simon Peyton Jones2014-12-231-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of silent superclass parameters was to solve the awkward problem of superclass dictinaries being bound to bottom. See THE PROBLEM in Note [Recursive superclasses] in TcInstDcls Although the silent-superclass idea worked, * It had non-local consequences, and had effects even in Haddock, where we had to discard silent parameters before displaying instance declarations * It had unexpected peformance costs, shown up by Trac #3064 and its test case. In monad-transformer code, when constructing a Monad dictionary you had to pass an Applicative dictionary; and to construct that you neede a Functor dictionary. Yet these extra dictionaries were often never used. (All this got much worse when we added Applicative as a superclass of Monad.) Test T3064 compiled *far* faster after silent superclasses were eliminated. * It introduced new bugs. For example SilentParametersOverlapping, T5051, and T7862, all failed to compile because of instance overlap directly because of the silent-superclass trick. So this patch takes a new approach, which I worked out with Dimitrios in the closing hours before Christmas. It is described in detail in THE PROBLEM in Note [Recursive superclasses] in TcInstDcls. Seems to work great! Quite a bit of knock-on effect * The main implementation work is in tcSuperClasses in TcInstDcls Everything else is fall-out * IdInfo.DFunId no longer needs its n-silent argument * Ditto IDFunId in IfaceSyn * Hence interface file format changes * Now that DFunIds do not have silent superclass parameters, printing out instance declarations is simpler. There is tiny knock-on effect in Haddock, so that submodule is updated * I realised that when computing the "size of a dictionary type" in TcValidity.sizePred, we should be rather conservative about type functions, which can arbitrarily increase the size of a type. Hence the new datatype TypeSize, which has a TSBig constructor for "arbitrarily big". * instDFunType moves from TcSMonad to Inst * Interestingly, CmmNode and CmmExpr both now need a non-silent (Ord r) in a couple of instance declarations. These were previously silent but must now be explicit. * Quite a bit of wibbling in error messages
* Change performance numbers for T3064Richard Eisenberg2014-12-191-1/+2
|
* Optimize flattener by trying to reduce a TF before reducing its args.Richard Eisenberg2014-12-191-5/+9
| | | | | This has a demonstrated 2x speed boost on the T9872{a,b,c} tests. (#9872)
* Add Jan Stolarek's test for Trac #9872Simon Peyton Jones2014-12-192-0/+157
|
* Performance enhancements in TcFlatten.Richard Eisenberg2014-12-171-5/+11
| | | | | | | | | | | | | | | This commit fixes some performance regressions introduced by 0cc47eb, adding more `Coercible` magic to the solver. See Note [flatten_many performance] in TcFlatten for more info. The improvements do not quite restore the old numbers. Given that the solver is really more involved now, I am accepting this regression. The way forward (I believe) would be to have *two* flatteners: one that deals only with nominal equalities and thus never checks roles, and the more general one. A nice design of keeping this performant without duplicating code eludes me, but someone else is welcome to take a stab.
* *Really* Re-Update Haddock submoduleHerbert Valerio Riedel2014-12-161-2/+2
| | | | The actual gitlink update got lost in 0c9c2d899e63b810e7ab6b486f7244826b4a2e33
* Fixup bad haddock.base perf-num bump in 0c9c2d89Herbert Valerio Riedel2014-12-141-2/+2
|
* Re-Update Haddock submodule to latest `master` tipHerbert Valerio Riedel2014-12-141-2/+4
| | | | | | | | | The previous attempt failed, but hopefully this one succeeds... This also updates the perf-numbers for `haddock.base` and `haddock.Cabal` NB: this switches from `ghc-head` to `master` branch temporarily until GHC 7.10 has been properly branched off.
* Revert "Update Haddock submodule to latest `master` tip"Herbert Valerio Riedel2014-12-141-4/+2
| | | | | | | | This reverts commit 7f634320a2c39f4f81f631deb844acbaebaced66 again for now as it causes validate's bindist phase to fail with haddock: internal error: .../install dir/lib/ghc-7.9.20141214/html: getDirectoryContents: does not exist (No such file or directory)
* Update Haddock submodule to latest `master` tipHerbert Valerio Riedel2014-12-141-2/+4
| | | | | | | This also updates the perf-numbers for `haddock.base` and `haddock.Cabal` NB: this switches from `ghc-head` to `master` branch temporarily until GHC 7.10 has been properly branched off.
* 32-bit performance changes following constraint solver improvementsSimon Peyton Jones2014-12-112-7/+15
| | | | Things get faster, except T5030
* Add a third test variant to Trac #9872Simon Peyton Jones2014-12-113-0/+206
|
* Tests for Trac #9872Simon Peyton Jones2014-12-105-0/+392
|
* Testsuite wibbles from constraint-solver improvementsSimon Peyton Jones2014-12-102-8/+17
|
* catch some recent typosGabor Greif2014-12-081-1/+1
|
* Revise the inert-set invariants againSimon Peyton Jones2014-12-081-2/+4
| | | | | | | | | | | | | | | | | | | | | In particular this patch - Accepts that rewriting with the inert CTyEqCans should be done recursively (hence removing the Bool result from flattenTyVarOuter) - Refines the kick-out criterion, in paticular to avoid kick-out of (a -f-> ty) when f cannot rewrite f. This is true of Wanteds and hence reduces kick-outs of Wanteds, perhaps by a lot This stuff is not fully documented because the details are still settling, but it's looking good. (And it validates.) This patch includes the testsuite wibbles. perf/compiler/T5030 and T5837 both improve in bytes-allocated (by 11% and 13% resp), which is good. I'm not sure which of today's short series of patches is responsible, nor do I mind much. (One could find out if necessary.)
* Update 32-bit performace numbers (has not been done for ages)Simon Peyton Jones2014-12-034-16/+37
|
* Re-center bytes-allocated for `haddock.compiler`Herbert Valerio Riedel2014-11-221-1/+2
| | | | | | | | This should silence the perf/haddock haddock.compiler [stat not good enough] (normal) test-failure...
* Wibbles (usually improvements) to error messagesSimon Peyton Jones2014-11-211-1/+2
|
* Implement new integer-gmp2 from scratch (re #9281)Herbert Valerio Riedel2014-11-122-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done as a separate `integer-gmp2` backend library because it turned out to become a complete rewrite from scratch. Due to the different (over)allocation scheme and potentially different accounting (via the new `{shrink,resize}MutableByteArray#` primitives), some of the nofib benchmarks actually results in increased allocation numbers (but not necessarily an increase in runtime!). I believe the allocation numbers could improve if `{resize,shrink}MutableByteArray#` could be optimised to reallocate in-place more efficiently. Here are the more apparent changes in the latest nofib comparision between `integer-gmp` and `integer-gmp2`: ------------------------------------------------------------------ Program Size Allocs Runtime Elapsed TotalMem ------------------------------------------------------------------ ... bernouilli +1.6% +15.3% 0.132 0.132 0.0% ... cryptarithm1 -2.2% 0.0% -9.7% -9.7% 0.0% ... fasta -0.7% -0.0% +10.9% +10.9% 0.0% ... kahan +0.6% +38.9% 0.169 0.169 0.0% ... lcss -0.7% -0.0% -6.4% -6.4% 0.0% ... mandel +1.6% +33.6% 0.049 0.049 0.0% ... pidigits +0.8% +8.5% +3.9% +3.9% 0.0% power +1.4% -23.8% -18.6% -18.6% -16.7% ... primetest +1.3% +50.1% 0.085 0.085 0.0% ... rsa +1.6% +53.4% 0.026 0.026 0.0% ... scs +1.2% +6.6% +6.5% +6.6% +14.3% ... symalg +1.0% +9.5% 0.010 0.010 0.0% ... transform -0.6% -0.0% -5.9% -5.9% 0.0% ... ------------------------------------------------------------------ Min -2.3% -23.8% -18.6% -18.6% -16.7% Max +1.6% +53.4% +10.9% +10.9% +14.3% Geometric Mean -0.3% +1.9% -0.8% -0.8% +0.0% (see P35 / https://phabricator.haskell.org/P35 for full report) By default, `INTEGER_LIBRARY=integer-gmp2` is active now, which results in the package `integer-gmp-1.0.0.0` being registered in the package db. The previous `integer-gmp-0.5.1.0` can be restored by setting `INTEGER_LIBRARY=integer-gmp` (but will probably be removed altogether for GHC 7.12). In-tree GMP support has been stolen from the old `integer-gmp` (while unpatching the custom memory-allocators, as well as forcing `-fPIC`) A minor hack to `ghc-cabal` was necessary in order to support two different `integer-gmp` packages (in different folders) with the same package key. There will be a couple of follow-up commits re-implementing some features that were dropped to keep D82 minimal, as well as further clean-ups/improvements. More information can be found via #9281 and https://ghc.haskell.org/trac/ghc/wiki/Design/IntegerGmp2 Reviewed By: austin, rwbarton, simonmar Differential Revision: https://phabricator.haskell.org/D82
* Disable T4801/peak_megabytes_allocatedHerbert Valerio Riedel2014-11-121-17/+19
| | | | | | This test seems too close to a tipping point (and thus too sensitive to the build-env used) and T4801's `max_bytes_used` was disabled as well some time ago for a similiar reason.
* Improve Applicative definitionsDavid Feuer2014-11-071-1/+2
| | | | | | | | | | | | | | | | | | | | | Generally clean up things relating to Applicative and Monad in `GHC.Base` and `Control.Applicative` to make `Applicative` feel like a bit more of a first-class citizen rather than just playing second fiddle to `Monad`. Use `coerce` and GND to improve performance and clarity. Change the default definition of `(*>)` to use `(<$)`, in case the `Functor` instance optimizes that. Moreover, some manually written instances are made into compiler-derived instances. Finally, this also adds a few AMP-related laws to the `Applicative` docstring. NOTE: These changes result in a 13% decrease in allocation for T9020 Reviewed By: ekmett, hvr Differential Revision: https://phabricator.haskell.org/D432
* Re-enable T3064, which works nowSimon Peyton Jones2014-11-061-2/+1
|
* Switch off lazy flattening (fix Trac #3064)Simon Peyton Jones2014-11-061-4/+4
| | | | | | | | See Note [Lazy flattening] in TcFlatten. Lazy flattening was an apparently good idea which actually made the type inference engine go a LOTS slower in T3064. So I switched it off again.
* Give T3064 the right module name (just tidying up)Simon Peyton Jones2014-11-061-1/+1
|
* Temporarily disable T3064 (see #9771)Herbert Valerio Riedel2014-11-051-1/+2
| | | | | This disables T3064 temporarily as it puts a strain on buildbots during validation exhausting all available memory.
* Re-center perf-numbers for T5631Herbert Valerio Riedel2014-11-041-1/+2
|
* Compiler performance is much worse in for loopy givensSimon Peyton Jones2014-11-042-6/+38
| | | | | | | | | | | This is a deliberate choice, to simplify code, invariants, and I think performance in typical cases. The "loopy givens" case is situations like [G] a ~ TF (a, Int) where TF is a type function with TF (a,b) = (TF a, TF b). See Note [An alternative story for the inert substitution] in TcFlatten.
* Testsuite error message changesSimon Peyton Jones2014-11-042-155/+169
|
* Further relax T1969’s max_bytes rangeJoachim Breitner2014-11-041-2/+3
|
* base: Refactor/clean-up *List modulesDavid Feuer2014-10-281-1/+1
| | | | | | | | | | | | | | | | This gets rid of all hand-unboxing in `GHC.List` and moves `Foldable` requirements from `Data.OldList` into `GHC.List` (preparatory work for addressing #9716). Specifically, this moves the definition of `maximum`, `minimum`, `foldl'`, `foldl1`, `foldl1'`, `sum`, and `product` into `GHC.List` (which now needs to import `GHC.Num`) Make `take`, `drop`, `length`, and `!!` generally saner (see also #9510) Performance overall seems minimally affected. Some things go up; some things go down; nothing moves horribly much. The code is much easier to read. Differential Revision: https://phabricator.haskell.org/D380
* Deactivate T3064 `max_bytes_used`-checkHerbert Valerio Riedel2014-10-271-21/+24
| | | | | | | | | | | | | | Summary: T3064 is deactivated for now because it's currently too volatile and causes too much noise in Phabricator's CI C.f. 4805abf413c02a2ed1af4fbeca2476590e984e37 Reviewers: austin Subscribers: thomie, carter, ezyang, simonmar Differential Revision: https://phabricator.haskell.org/D381
* Python 3 support, second attempt (Trac #9184)Krzysztof Gogolewski2014-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a fixup of https://phabricator.haskell.org/D233 The only difference is in findTFiles (first commit), which previously broke Windows runner; now I translated literally instead attempting to improve it, and checked it works. Test Plan: I used validate under 2,3 on Linux and under 2 on msys2. On Windows I've seen a large number of failures, but they don't seem to be connected with the patch. Reviewers: hvr, simonmar, thomie, austin Reviewed By: austin Subscribers: thomie, carter, ezyang, simonmar Differential Revision: https://phabricator.haskell.org/D310 GHC Trac Issues: #9184
* Actually put in new perf number for T4801Joachim Breitner2014-10-131-1/+1
| | | | | which I just put it in comments. Thanks Yuras for noticing, and sorry for the noise.