www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - A move semantics benchmark

reply bearophile <bearophileHUGS lycos.com> writes:
A link found through Reddit, a benchmark about Move Semantics Benchmark in C++
STL:
http://cpp-next.com/archive/2010/10/howards-stl-move-semantics-benchmark/

Bye,
bearophile
Oct 14 2010
next sibling parent so <so so.do> writes:
Wow it looks great! Too bad you have to wait so many years to get an  
improvement like move.

On Thu, 14 Oct 2010 15:29:52 +0300, bearophile <bearophileHUGS lycos.com>  
wrote:

 A link found through Reddit, a benchmark about Move Semantics Benchmark  
 in C++ STL:
 http://cpp-next.com/archive/2010/10/howards-stl-move-semantics-benchmark/

 Bye,
 bearophile
-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Oct 14 2010
prev sibling parent reply Peter Alexander <peter.alexander.au gmail.com> writes:
== Quote from bearophile (bearophileHUGS lycos.com)'s article
 A link found through Reddit, a benchmark about Move Semantics
Benchmark in C++ STL:
 http://cpp-next.com/archive/2010/10/howards-stl-move-semantics-
benchmark/
 Bye,
 bearophile
I don't really like that benchmark. I think it will deceive people into thinking that supported move semantics are going to give your programs huge speed improvements. In reality, you wouldn't do all those things with those massive objects. A real benchmark would take some standard C++ program, add any extra move constructors where applicable, and then compare the performance to the program without move constructors. That way, you're actually seeing what move semantics will really bring to the performance of a real program.
Oct 14 2010
parent reply bearophile <bearophileHUGS lycos.com> writes:
Peter Alexander:

 That way, you're actually seeing what move semantics will
 really bring to the performance of a real program.
There are synthetic benchmarks, and various shades of more realistic benchmarks. Both kinds have advantages and disadvantages, and both have their place and may be useful. That's a synthetic benchmark. Bye, bearophile
Oct 14 2010
parent Peter Alexander <peter.alexander.au gmail.com> writes:
On 14/10/10 7:30 PM, bearophile wrote:
 Peter Alexander:

 That way, you're actually seeing what move semantics will
 really bring to the performance of a real program.
There are synthetic benchmarks, and various shades of more realistic benchmarks. Both kinds have advantages and disadvantages, and both have their place and may be useful. That's a synthetic benchmark. Bye, bearophile
Fair enough, although I find this benchmark pretty useless. All it says is that move semantics can provide performance improvements in contrived situations. You can show demonstrate just about anything in contrived situations.
Oct 14 2010