It basically tells the compiler that instead of calling a function (which could involve putting variables onto the stack, allocating memory, stuff that takes extra time), it could try to just insert the code directly at the call site, like this:
1 2 3 4 5 6 7 8 9 10 11 12
#include <stdio.h>
inlinevoid test(void)
{
puts("Hello!");
}
int main ()
{
test();
return 0;
}
becomes
1 2 3 4 5 6 7
#include <stdio.h>
int main ()
{
puts("Hello!");
return 0;
}
i just wanna get it straight so i don't have misunderstanding, when you call a function within main() the calling got stacked in the memory, like the value that passed by value or so forth, rather of calling it inlinedly which is faster... am i right?