Does a function that returns a constant work slower than a void function?
Simplest example to highlight the difference:
int foo()
{
doSomething();
return 0;
}
void bar()
{
doSomething();
return;
}
int main()
{
foo();
bar();
}
Is bar faster than foo, and why?
Simplest example to highlight the difference:
int foo()
{
doSomething();
return 0;
}
void bar()
{
doSomething();
return;
}
int main()
{
foo();
bar();
}
Is bar faster than foo, and why?
No comments:
Post a Comment