develooper Front page | perl.perl6.porters | Postings from April 2000

Simplfied vector<> ?

Thread Next
From:
Chip Salzenberg
Date:
April 29, 2000 22:26
Subject:
Simplfied vector<> ?
Message ID:
20000429222651.H1044@perlsupport.com
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.
-- 
Chip Salzenberg              - a.k.a. -              <chip@valinux.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
    but he stepped in a wormhole and had to go in early."  // MST3K

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About