[PATCH] BumpPtr allocate SimpleReferences
kledzik at apple.com
kledzik at apple.com
Thu Dec 4 11:13:45 PST 2014
A downside to BumpVector is that as the vector grows (by adding References), the capacity is doubled by bump allocating a new chunk. All the previous allocations (e.g. if current at 8 elements, the allocs for 1, 2, and 4) are wasted space in the bumpptr pool.
A linked list does not have this problem because the elements never move and are never copying. They just have a pointer to the next one.
http://reviews.llvm.org/D6518
More information about the llvm-commits
mailing list