
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/02/2010 07:20 PM, Jeffrey Lee Hellrung, Jr. wrote:
I've just posted the results of my testing. As to *why* it's that much faster, I can only provide educated guesses.
I think it is important to understand what the discrepancy is, because it may be that you're not writing your algorithms in a move-aware way, producing copies unnecessarily. This wouldn't surprise me if you wrote the original implementations with COW primarily in mind (which I can't blame you for).
I did, of course. But with the exception of operator+ and operator-, I don't see anything that could benefit from additional move-specific overloads.
So, bottom line: Give me a real example of an algorithm where COW gives superior performance to move semantics, and I'll buy into the COW implementation.
I'll give you one better: the actual timings, which you can reproduce yourself if you doubt their accuracy. :-) Just let me know if you want the code I used to come up with them... the rules I read say that I'm not supposed to post any files to this list, so if you want them, I'll need to upload the changes somewhere.
I'll take a look at the performance testing code when I get a chance, but I'm guessing a problem *could* be that you're not maximizing the opportunities to moven from or otherwise modify temporaries.
It's possible. Show me a better way and I'll adopt it. I don't think the operator+ and operator- are going to make a lot of difference to the results though. - -- Chad Nelson Oak Circle Software, Inc. * * * -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkveKIoACgkQp9x9jeZ9/wT2KACg0ahGfqGKCRaa+K1R4qv6Bk+1 kagAoI1nfsFnDgGMf/80w4mb4IzMSAPp =fWUB -----END PGP SIGNATURE-----