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) andpush
,push_back
(26322556)
It is well known that auto
is compile-time, so there will be no performance difference.