Unpack primitive types by default in data
johan.tibell at gmail.com
Fri Feb 17 01:59:11 CET 2012
On Thu, Feb 16, 2012 at 4:52 PM, Alex Mason <axman6 at gmail.com> wrote:
> Sounds like it's definitely worth playing with. I would hesitate to use the shootout benchmarks though, simply because anything there is already going to be unpacked to the hilt.
That was the point of number (2) above. By disabling their unpack
pragmas through the compiler and measuring the performance, we can
simulate a world where people don't write unpack pragmas and then see
how much GHC could improve things in such a world. If the gain is
large enough we can turn this optimization on and people can waste
less time cluttering their code with unpack pragmas!
Note that this proposal doesn't but you any new expressive powers. The
intention is two-fold: decrease the amount of clutter in Haskell
programs and have code written by beginner/intermediate level
Haskellers perform better out-of-the-box.
> How difficult do you think it would be to implement this in GHC?
Quite easy I think. All the difficulty is in getting good benchmarks.
More information about the Glasgow-haskell-users