When calculating core size and core stats, we previously
calculated sizes/stats for sub-parts and then added them.
It should be faster to thread an accumulator through.
- rGHC Glasgow Haskell Compiler
Lint Warnings Excuse: Deal with it later. Severity Location Code Message Warning compiler/types/TyCoRep.hs:2845 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2846 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2847 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2850 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2855 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2856 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2857 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2858 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2861 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2862 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2864 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2867 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2868 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2872 TXT3 Line Too Long Warning compiler/types/TyCoRep.hs:2882 TXT3 Line Too Long
No Unit Test Coverage
- Build Status
Buildable 15380 Build 25871: [GHC] Linux/amd64: Patch building Build 25870: [GHC] OSX/amd64: Continuous Integration Build 25869: [GHC] Windows/amd64: Continuous Integration Build 25868: arc lint + arc unit
I don't understand why this would be faster, could you explain?
As far as I know all these functions are only used when compiling with -v/-dshow-passes, so they aren't terribly performance-critical. IIRC after 09d70107a there wasn't any remaining noticeable performance difference between using -v and not.
Well, it means not having to stack up all the calculations; we can perform some of them as we go. That is, we only need to build up on one side of each node. But you're right; if this isn't that important in practice, it's not worth the bother. However, it might be worth the bother for exprSize, which is used by the simplifier.