!2965 [1] seeks to improve the performance of derived Generic(1) instances by heuristically annotating implementations of the from(1) and to(1) class methods with INLINE[1] pragmas. For the most part, this results in performance wins, as the generic intermediate representations of data types can be optimized away in more situations.
However, I'm unclear on one aspect of the MR: it actually leads to a compile-time performance increase (specifically, in bytes allocated) in one test case: T12227:
Test Metric value New value Change
T12227(normal) ghc/alloc 518417756.0 526479616.0 +1.6% BAD
The MR author provides an explanation for why this happens here [2]. However, as I am not really a GHC performance guru, it's difficult for me to accurately judge whether this difference is within acceptable limits or not.
For those of you who care about compile-time performance, would you be willing to give !2965 a look over and judge whether the difference is acceptable? I think this is the last remaining hurdle to clear before we can land !2965, so your input would be greatly appreciated. Thanks!
Ryan S.
-----
[1] https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2965
[2] https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2965#note_304501