3 ms·
The compiler can inline things for you. There is a way to specify that a function should be inlined: inline. https://en.cppreference.com/w/cpp/language/inline
by 29athrowaway 6y ago
The compiler can inline things for you. There is a way to specify that a function should be inlined: inline.
https://en.cppreference.com/w/cpp/language/inline https://en.cppreference.com/w/cpp/language/inline
If this specifier is used, then when your inlined function is compiled there will be no function call, just the inlined code.
This is just a hint for the compiler, though. The compiler can ignore this hint, and usually does.
- gpderetta 6y ago"In no way, shape, or form am I making a case that avoiding function calls alone directly helps performance."