#10397: Compiler performance regression 7.6 -> 7.8 in elimCommonBlocks -------------------------------------+------------------------------------- Reporter: TobyGoodwin | Owner: Type: bug | Status: merge Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | performance Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: see ticket | Blocking: | Differential Revisions: Phab:D892 | Phab:D896 -------------------------------------+------------------------------------- Comment (by Joachim Breitner <mail@…>): In [changeset:"73f836f5d57a3106029b573c42f83d2039d21d89/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="73f836f5d57a3106029b573c42f83d2039d21d89" CmmCommonBlockElim: Improve hash function Previously, the hash function used to cut down the number of block comparisons did not take local registers into account, causing far too many similar, but different bocks to be considered candidates for the (expensive!) comparision. Adding register to the hash takes CmmCommonBlockElim's share of the runtime of the example in #10397 from 17% to 2.5%, and eliminates all unwanted hash collisions. This patch also replaces the fancy trie by a plain Data.Map. It turned out to be not performance critical, so this simplifies the code. Differential Revision: https://phabricator.haskell.org/D896 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10397#comment:28> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler