Extraction of Uniques is in some places done inefficiently
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.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |