A move semantics benchmark

Peter Alexander peter.alexander.au at gmail.com
Thu Oct 14 11:18:20 PDT 2010


== Quote from bearophile (bearophileHUGS at 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.


More information about the Digitalmars-d mailing list