haskell/cabal — pull request #1191 by nomeata (2013-02-11 21:18:51+00:00)
Title: Much faster Distribution.Client.Dependency.Modular.PSQ.splits

I tried to speed up cabal-install with the file at http://anonscm.debian.org/darcs/pkg-haskell/tools/all-packages/all-packages.cabal. At first I thought I could add special handling for == dependencies. But after looking at the profile I found the attached patch to have a much greater impact.

This reduces the runtime of "cabal install --dry-run" on the file from ~12s to 2.1s.

Equivalency with previous implementation verified with QuickCheck in ghci.