. "But you know beforehand this block of code will run in many loops which changes the scenario, now function call is an issue." . . .