The tyConUnique record field in TyCon is redundant because there's
a corresponding unique in tyConName. Since both of those uniques are equal and
available for any TyCon, we can safely remove one of them.
- rGHC Glasgow Haskell Compiler
No Unit Test Coverage
- Build Status
Buildable 12851 Build 17196: [GHC] Linux/amd64: Patch building Build 17195: [GHC] OSX/amd64: Continuous Integration Build 17194: arc lint + arc unit
I have also wondered about this. The only reason I can see to cache the unique like this is to save an indirection as the unique is quite often used. That being said, I would be surprised if the difference would be measurable.
On the whole this patch seems reasonable to me but I'll let @simonpj weigh in as well.
Yes, this is purely an efficiency question. It applies to Var as well.
If you'd like to pursue it, could you do some careful measurements please? Any effects are likely to be small, so using Criterion might be called for.