Description
Stores TODO
- Unboxed
- Boxed
- Compacted
- Resource
Unboxed
Uses growable unboxed MVector
s under the hood. Probably fastest of array-like component stores.
Boxed
Uses growable boxed MVector
s under the hood. Might suffer from long-term cache locality problems. Also has GC performance problems for large stores (due to card table).
Compacted
The idea is to provide a [mostly] contiguous store for long-lived boxed components (excluding functions and mutable data as per compact). A compact store is divided into compact-region chunks. On mutation (which should be avoided at all costs for preexisting components), a master record list w/ pointers to each chunk element from every chunk is updated to point to copies of the mutated chunk (with the mutated element(s) changed). Old references will still keep old blocks alive... beware!
Question: is copying on any modification a good idea? Maybe have some internal fragmentation heuristic?
Resource
Basically a global IORef
.
Activity