
Joel de Guzman <joel@boost-consulting.com> writes:
David Abrahams wrote:
Joel de Guzman <joel@boost-consulting.com> writes:
Tobias Schwinger wrote:
Joel de Guzman wrote:
Tobias Schwinger wrote:
4. Choice of datastructures
I used cons lists for the tree because I figured they might be limitless and because the structure is built one element at a time. There will be a lot of traversal later -- does it make a difference / would have 'vector' been a better choice? It's really hard to tell. Only testing and benchmarking will reveal which to choose. I'm sure you noticed that from the recent Spirit-dev tests conducted. I too get mild surprises every now and then with the test results. Anyway, in general, vectors are way faster to traverse and have the smallest memory (struct) footprints.
Seems to me a vector can't do as well as some other structures when many of the elements of the tuple are empty classes.
In terms of memory footprint?
Yes. -- Dave Abrahams Boost Consulting www.boost-consulting.com