Skip to content
Snippets Groups Projects
Commit 299b7436 authored by Simon Peyton Jones's avatar Simon Peyton Jones Committed by Marge Bot
Browse files

Improve performance of eta expansion

Eta expansion was taking ages on T18223.  This patch

* Aggressively squash reflexive casts in etaInfoApp.
  See Note [Check for reflexive casts in eta expansion]
  These changes decreased compile-time allocation by 80%!

* Passes the Simplifier's in-scope set to etaExpandAT, so we
  don't need to recompute it.  (This alone saved 10% of compile
  time.)

  Annoyingly several functions in the Simplifier (namely
  makeTrivialBinding and friends) need to get SimplEnv, rather
  than SimplMode, but that is no big deal.

Lots of small changes in compile-time allocation, less than 1%
and in both directions.  A couple of bigger changes, including
the rather delicate T18223

T12425(optasm) ghc/alloc    98448216.0    97121224.0  -1.3% GOOD
T18223(normal) ghc/alloc  5454689676.0  1138238008.0 -79.1% GOOD

Metric Decrease:
    T12425
    T18223
parent a199d653
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment