I'm trying to do some things ... this question may seem silly, but I will try. Suppose each function has 100 lines of the same code. or does this difference not reach the real level? which will be faster to execute in the main function:
struct A { static void f() { cout << "static one"; } };
or this one:
void f() { cout << "non static"; } int main() { A::f(); f(); }
source share