
On Sun, Sep 21, 2008 at 8:01 AM, Joaquin M Lopez Munoz <joaquin@tid.es> wrote:
Emil Dotchevski <emil <at> revergestudios.com> writes:
On Sun, Sep 14, 2008 at 9:42 AM, JOAQUIN M. LOPEZ MUÑOZ <joaquin <at> tid.es> wrote: Hi Emil, as promised, some profile results are shown at:
http://bannalia.blogspot.com/2008/09/profiling-stablevector.html
This is interesting, so basically the stable iterators/references are achieved by allocating each object in a separate node. This got me thinking, from certain point of view the difference between std::list and your stable_vector is the ability of the latter to return elements by index in O(1). Isn't it possible to decouple this ability from the container itself? In other words, could your code be refactored to provide indexing over any type of "host container"? OTOH, I'm guessing that the only type of "host container" that would make sense is std::list, since the other "stable containers" don't preserve the ordering between the elements (which makes indexing impractical) so maybe it isn't worth the effort. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode