darcs patch: Replace FastInt with unpacked/newtyped Int
Simon Peyton-Jones
simonpj at microsoft.com
Mon Feb 4 11:13:46 EST 2008
| This patch changes Unique from
|
| data Unique = MkUnique FastInt
|
| to
|
| newtype Unique = MkUnique Int
|
| Since this is performance critical code, I have checked the compiler output
| (core and stg), to check that it is really the same. The only difference is an
| improvement. mkUniqueGrimely no longer has to unbox and rebox its argument:
OK, good stuff.
| When also trying to change the FastInt in Var to an unpacked Unique I ran into a
| bug (#2070); The record selector realUnique will not be optimized at all.
I'm working on a patch for exactly this. I plan to commit this week.
Simon
More information about the Cvs-ghc
mailing list