[GHC] #8041: Extraction of Uniques is in some places done inefficiently

#8041: Extraction of Uniques is in some places done inefficiently ------------------------------------+------------------------------------- Reporter: parcs | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- In some places in the GHC sources, extraction of a `Unique` from a `UniqSupply` is done in the following manner: {{{ case splitUniqSupply us of (us1,us2) -> (uniqFromSupply us1, us2) }}} This way of splitting a `UniqSupply` into a `Unique` and a new `UniqueSupply` is needlessly inefficient since it forces and then throws away an extra `Unique`. `takeUniqFromSupply` should be used instead. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8041 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8041: Extraction of Uniques is in some places done inefficiently -------------------------------------+------------------------------------ Reporter: parcs | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by parcs): Patch to GHC and testsuite attached. I successfully bootstrapped GHC with this commit and ran the FAST testsuite against it. I encountered two other testsuite failures that seem unrelated to this commit: {{{ ../../libraries/process/tests process007 [bad stdout] (normal) perf/compiler T3064 [stat too good] (normal) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8041#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8041: Extraction of Uniques is in some places done inefficiently -------------------------------------+------------------------------------ Reporter: parcs | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by parcs): * status: new => patch * version: 7.6.3 => 7.7 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8041#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8041: Extraction of Uniques is in some places done inefficiently -------------------------------------+------------------------------------ Reporter: parcs | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by thoughtpolice): * status: patch => closed * resolution: => fixed Comment: Merged (with a tiny change to please validate.) Thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8041#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC