
#9233: Compiler performance regression
---------------------------------+------------------------------------
Reporter: augustss | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: Windows | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
---------------------------------+------------------------------------
Comment (by rwbarton):
I profiled GHC and ran it on Lennart's sample code. It spent quite a lot
of time, 23.4% in `coercionKind.go`. Further investigation seemed to
indicate that most of that time was spent in the `TyConAppCo` case, when
called from `coercionRole`. I made the Functor and Applicative (and other)
instances of `Pair` lazy in the pair, trying to avoid traversing the
entire coercion when we only need the outermost type constructor. It did
speed up the compilation significantly, from 25 seconds to 18 seconds:
{{{
# current HEAD
<