[GHC] #8041: Extraction of Uniques is in some places done inefficiently
GHC
ghc-devs at haskell.org
Sat Jul 6 22:46:40 CEST 2013
#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
More information about the ghc-tickets
mailing list