how fast does loop() run in Arduino Hi I am using Arduino Nano to gamify my experience on Unity3D. I know that Update() in Unity3D runs every frame per second but I because I'm not an electronics guy I don't know how loop() function runs on Arduino.

Does it depends on number of CPU cycles(or micro processor chip in case of Arduino) or what? Please explain. I facing some lags in my game. I can fix them only if know how is loop() function running on Arduino

There ain't a lot of information about loop() in arduino documentation
Loop runs as long as loop needs to run. 

Instructions in a CPU run sequentially. The more instructions there are the longer it takes to run.

The more code you put in loop the longer loop will run. 

There are two ways to know how long each iteration of loop will take:


Profiling: Actively time each iteration of loop, though be warned, the act of timing will affect the amount of time taken.
Cycle counting. Compile the source into assembly and total up the number of clock cycles needed for all the instructions (including calls to functions). Arduous for small loops, a gargantuan task for anything else.


Also note that many external factors can affect how long loop() takes to run - such as serial communication speed, etc.