I am not really sure, but it may be MacroDroid itself forcing waiting 50ms even though you didn't used any wait action inside the loop. This is because in MacroDroid if you create loop that usually iterates many times before ending and don't put any wait action inside, you risk your device starting to lag, stutter, or even MacroDroid crashing, because MacroDroid just isn't as capable and efficient as some directly written code. This is because MacroDroid is a really high level "coding language" if I would call it that way. If you try to execute a big number of actions at once (or right after each other), which usually happens in loops without any wait action, you will get a sluggish experience and performance and fast phone usually won't help you too much. This is just one of MacroDroid's trade-offs. Simpler "coding" - lower performance.