From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2008-03-13 17:45:28
Thorsten Ottosen skrev:
> Marcin Kalicinski skrev:
>> I'll try to shed some light on what has happened to property_tree since
>> review and why it's been dragging.
>> 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.
> For now, it doesn't really matter IMO. People often find it useful
> anyway, and move-semantics will probably help a lot when it arrives.
I just remembered this: I think you can make a very well performing
linked list using Boost.Intrusive which basically allows you to store
the nodes in a vector:
AFAICT, this will almost completely remove dynamic allocations, exceptio
for growing the vector (a deque might be more appropriate).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk