From: Chip Salzenberg [mailto:[EMAIL PROTECTED]]
> 
> The standard C++ vector<> container is almost perfect for use in Perl
> arrays and the data stack.  But it has a major weakness...  It's _so_
> general that it doesn't use memcpy() [or moral equivalent] when it has
> to grow.  Instead, it uses copy constructors in a loop.  That could be
> a major performance issue with vector<Counted_p<T>>.
> 
> Now, I could write a vector<> -- it's not that hard, as C++ goes --
> but I'm wondering if anyone has a lead on such a thing already, and/or
> library(ies) of such handy classes.

I don't know if/how such details are or should be handled, but you might
want to take a look at boost (www.boost.org) or ask on the boost mailing
list ([EMAIL PROTECTED]). The people there have done a lot of work on
extensions to the STL classes, and may have what you want (I recall
something about a fast allocator, which may help performance of the standard
containers - if not, I'm sure there are people on the list who would be
interested in thrashing out performance issues like this).

On a related note, boost already has a counted pointer class, and they are
working hard on efficiency issues for it, so that may be worth a look, too.

Paul.

Reply via email to