Unpack primitive types by default in data

Simon Marlow marlowsd at gmail.com
Wed Feb 29 11:08:02 CET 2012

On 28/02/2012 15:56, Johan Tibell wrote:
> On Tue, Feb 28, 2012 at 1:11 AM, Simon Marlow<marlowsd at gmail.com>  wrote:
>> I think there are some in GHC - I've been surprised occasionally when adding
>> an UNPACK makes things worse.
> I just realized that there is a failure mode I didn't quite consider:
> having a mix of strict and non-strict primitive fields. While this can
> happen on purpose, I think it happens more often due to non-strict
> being the default. Having a field with such a mix might lead to more
> re-boxing.

(I think you meant "record", not "field" in the last sentence, right?)

It's not obvious to me why having a mixture of strict and nonstrict 
(maybe you meant UNPACKed and not UNPACKed?) fields would make things 
worse.  Could you give a concrete example?


More information about the Glasgow-haskell-users mailing list