Implementing clean and simple move symantics
Joe Buck
Joe.Buck@synopsys.COM
Wed Nov 24 22:05:00 GMT 2004
On Wed, Nov 24, 2004 at 10:23:52PM +0100, Gabriel Dos Reis wrote:
> I see that we have a specialization of std::copy() for plain pointer
> arguments to use memcpy/memmove, but I have not seen evidence that
> such a specialization is faster -- for common cases -- than aligned
> access implied by the plain grammar school loop written in the primary
> template...
I doubt that it makes a difference in that case. I'm interested in
making things like std::vector<std::vector<int> > behave reasonably well.
The inner vectors can be moved with memmove when the outer vector needs
to grow; the current implementation will deep-copy the inner vectors.
More information about the Libstdc++
mailing list