0
Does inline functions really increase the execution time in c++?
I have read about when i shouldnt use inline functions in stackoverflow before, and it was saying that "if you think inline functions will make your code faster, dont use them ". My question is that inline functions are really faster than normal functions?
3 ответов
+ 2
Modern C++ compilers are smart enough to decide when to grant a request for making a function inline. An inline specifier is our request to the compiler, but whether or not the request is granted, is all up to the compiler.
More about this in following links:
http://www.cplusplus.com/articles/2LywvCM9/
https://www.tutorialspoint.com/cplusplus/cpp_inline_functions.htm
+ 2
Ipang so you mean even i dont declare a function inline compiler can make it inline? Also even i make inline compiler may not make it inline? I dont think this is right
+ 2
For a comprehensive explanation, please refer to the attached links 👍