Changes between Initial Version and Version 1 of Ticket #79

Show
Ignore:
Timestamp:
06/18/12 23:12:26 (11 months ago)
Author:
rl
Comment:

Note that GHC allocates additional space for boxed arrays which it uses to mark the bits that have changed since the last GC. Updating a mutable array would be an O(n) operation otherwise since the GC would have to rescan the entire array. So vector should indeed add around 4 words to the array, it's GHC that allocates more than N and for good reasons! I wouldn't really want to precisely document these GHC internals in vector, it seems like the wrong thing to do. Do you have an idea for something more general?

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #79 – description

    initial v1  
    1  
    21I've been surprised lately by the base-overhead of `Data.Vector.Vector`, as I assumed it to be somewhere near 4+N words, but it was actually more like 9+N words or so for N < 128, which is a lot on 64bit archs. 
    32