While-loop looping

Quick question, how many times per second does a while loop, loop through (on average)?

That’s like asking “how long is a piece of string”, it all depends what is inside the while loop. Years ago I did some simple benchmarking, a while loop that just toggles an IO line ran approximately 350,000 times a second.