Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is C++11 is faster than C++03 in terms of efficiency? [closed]

I work in trading firm and here latency matters a lot. The project assigns to me is developed using a mix of c and c++98 parts, But I believe we can make same project using C++11 without losing efficiency. As discussed with my seniors, they say you should stick with C and c++03 as they are efficient compare to C++11 at micro level. Can anyone highlight me If I go with C++11, will I get better results?

like image 364
arun pal Avatar asked Dec 18 '22 02:12

arun pal


1 Answers

C++11 is faster, because moving of objects was introduced. Mainly the usage of this feature in the STL speeds up some applications a lot without any code change in user code. Applications can be programmed much more efficient then before. Also constexpr construction can result in much faster application startup, because objects can reside in flash space on small controllers instead copy them into ram. There are a lot more features which help to get the code more efficient. For example emplace_back for conatainers help to generate objects in place instead of creating & copy them.

C++17 introduces guaranteed copy elision, which speeds up also in a lot of use cases.

like image 100
Klaus Avatar answered Dec 24 '22 00:12

Klaus