GHC.Prim.ByteArray# - confusing documentation

Antoine Latter aslatter at
Fri Jan 1 13:26:30 EST 2010

On Wed, Dec 30, 2009 at 5:47 AM, Simon Marlow <marlowsd at> wrote:
> On 30/12/09 11:09, Bulat Ziganshin wrote:
>> Hello Simon,
>> Wednesday, December 30, 2009, 1:44:54 PM, you wrote:
>> btw, is it possible to fix the behavior? it will reduce overhead for
>> storing small strings
> It would be possible yes.  When the RTS needs to know the size of the array
> in words it would have to do a calculation, so you'd have to find all the
> places in the RTS that do this (probably only a handful, as most of them go
> through the arr_words_sizeW() inline function).
> I don't plan to do this right now.  If someone else wants to tackle it then
> please go ahead, it'd be a fun afternoon hack.

I've written this up as ticket 3800:

The patches for ghc and integer-gmp are attached to the ticket.


More information about the Glasgow-haskell-users mailing list