Fix performance of flattener patch (#12919)
authorAlexander Vieth <aovieth@gmail.com>
Mon, 26 Mar 2018 15:19:27 +0000 (11:19 -0400)
committerRichard Eisenberg <rae@cs.brynmawr.edu>
Mon, 26 Mar 2018 21:23:48 +0000 (17:23 -0400)
commitb47a6c3a6d9c5da341184824549a6a835c79de15
tree56c4d1e56c18e3e965740b952e90bfff2271645a
parente3dbb44f53b2f9403d20d84e27f187062755a089
Fix performance of flattener patch (#12919)

This patch, authored by alexvieth and reviewed at D4451,
makes performance improvements by critically optimizing parts
of the flattener.

Summary:
T3064, T5321FD, T5321Fun, T9872a, T9872b, T9872c all pass.
T9872a and T9872c show improvements beyond the -5% threshold.
T9872d fails at 10.9% increased allocations.
compiler/typecheck/TcFlatten.hs
compiler/types/CoAxiom.hs
compiler/types/Coercion.hs
compiler/types/FamInstEnv.hs
compiler/types/Type.hs
testsuite/tests/perf/compiler/all.T
testsuite/tests/polykinds/T14846.stderr