Performance of C++11 features

Revision en1, by cjquines, 2017-04-12 20:13:01

This is based on the GNU C++11 compiler on Codeforces. Results inconclusive.

I will be omitting discussion of input and output, which is well-known.

  • No significant performance difference between ranged fors (26322469, 26322507) and iterating over elements (26316124)
  • No significant performance difference between assignment with tie (26322531) and regular assignment (26316124)
  • No significant performance difference between emplace, emplace_back (26316124) and push, push_back (26322556)

It is well known that auto is compile-time, so there will be no performance difference.

Tags c++, performance, c++11

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English cjquines 2017-04-12 20:13:01 766 Initial revision (published)