This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] : RFC : rvalue / move symantics
- From: Chris Jefferson <caj at cs dot york dot ac dot uk>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 17 Mar 2005 15:45:02 +0000
- Subject: Re: [patch] : RFC : rvalue / move symantics
- References: <4238BFF0.60007@cs.york.ac.uk> <4238C52E.3000200@suse.de>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Paolo Carlini wrote:
| Hi Chris,
|
|> While I still have some other things to finish cleaning, up I thought
|> I'd send out this simple patch that adds move symantics to std::vector
|> and std::unique, for any comments before untakeing adding the
|> symantics to all the other containers / algorithms.
|
|
| Thanks. Indeed, seems to me the right way to go: a small, self contained
| example that people can easily review. I will actually look into it in
| detail over the next days.
|
| A quick comment: can you possibly also add a simple performance
| testcase? I'm sure it's relatively easy to prepare an impressive one, in
| this area ;)
|
Yep, I'll neaten up the program I've been using. For a while I was
testing with an array of length 1000, and of course got a 1500x speed
increase.
One very interesting point that I'll put into the performance testsuite
is that even for vectors of length 1 the new code is still 50% faster,
and for empty vectors the new code still appears (very very) slightly
faster, which I found somewhat suprising, until I looked at
vector::operator= and realised it is quite an (unavoidably) large
function, so even for zero length vectors it still takes a while..
Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
iD8DBQFCOaX93FpDzErifpIRAmd6AJ0ckZo+g1vVklJEJLvztRi9gHVVVwCeIzpo
jvgYYMUENflTCvKq55EeOJo=
=z7VJ
-----END PGP SIGNATURE-----