This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] : RFC : rvalue / move symantics


-----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-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]