should Method usage be avoided to reduce the time???

I am new to codechef, I have one doubt, though method’s usage is recommended to avoid code repetition,
I wonder using method may actually increase the time of program as compiler has to save current variables then go to method definition then execute method & comes back & restore the previous result.

So in Codechef problems should I avoid method usage or it depends from problem to problem.

Thanks in advance.

In C/C++ you can use inline keyword, but according to SO compiler knows better than you when to do that, so do not do that, runtime won’t have significant difference I believe…

Use the functions, copy&paste errors are very bad.