My EA is running very slow on MT4 Tester

My EA is operating very slow on MT4 Tester, it contains loops and nested loops, I do not know if that would slow it down that much,

Can I save the data of the loops in functions in array and would that make a difference in speed of the tester?

thanks