[project @ 2004-08-17 15:23:47 by simonpj]
authorsimonpj <unknown>
Tue, 17 Aug 2004 15:24:13 +0000 (15:24 +0000)
committersimonpj <unknown>
Tue, 17 Aug 2004 15:24:13 +0000 (15:24 +0000)
commit59c796f8e77325d35f29ddd3e724bfa780466d40
tree69551211b07d3b5288696db495079319615166fc
parentc8898df0380dad4705353de00a48ea105d00bcc5
[project @ 2004-08-17 15:23:47 by simonpj]
-------------------------------
Use merge-sort not quicksort
Nuke quicksort altogether
-------------------------------

Quicksort has O(n**2) behaviour worst case, and this occasionally bites.
In particular, when compiling large files consisting only of static data,
we get loads of top-level delarations -- and that led to more than half the
total compile time being spent in the strongly connected component analysis
for the occurrence analyser.  Switching to merge sort completely solved the
problem.

I've nuked quicksort altogether to make sure this does not happen again.
15 files changed:
ghc/compiler/codeGen/CgCallConv.hs
ghc/compiler/codeGen/CgStackery.lhs
ghc/compiler/codeGen/CgUtils.hs
ghc/compiler/ghci/ByteCodeGen.lhs
ghc/compiler/iface/MkIface.lhs
ghc/compiler/main/ErrUtils.lhs
ghc/compiler/rename/RnNames.lhs
ghc/compiler/simplCore/SetLevels.lhs
ghc/compiler/simplStg/SRT.lhs
ghc/compiler/specialise/Rules.lhs
ghc/compiler/typecheck/TcDeriv.lhs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/utils/Digraph.lhs
ghc/compiler/utils/ListSetOps.lhs
ghc/compiler/utils/Util.lhs