I have two separate functions, bar() and foo(). The execution flow of my program supposed to be as follows:
input -> bar() -> foo() -> output
Currently, a teammate of mine on the same development team made a foo() call inside the bar() function, which destroyed the modularity design. While it's better from modular design perspective to wrap bar() and foo() calls in a wrapper function called procedure() for example, would it cost any performance in terms of adding an extra function overhead on the program stack? I plan to encapsulate the procedure functions as follows:
procedure(inputs)
{
bar();
foo();
}
Thanks in advance for the advices.