
14 Mar
2008
14 Mar
'08
3:55 p.m.
Marcin Kalicinski wrote:
The allocations problem remains. I have been unable to come up with a scheme that would reduce the number of allocations without compromising simplicty of the library. The key point is that I want to maintain validity of iterators in presence of insertions/erases. This rules out array based containers. The best I can think of is a custom list implementation. That has potential to reduce number of allocations by roughly 30%, which is not enough IMO.
Just a thought... Maybe a deque with gaps would suffice these requirements? I'm not familiar with the library but I had a similar task once and such approach did well enough.