"loop" can all be typed with one finger, as the letters are all together on the qwerty keyboard, and the "o" repeats itself.

"while" on qwerty is sort of a chore.

When you can touch-type, it's better to have keys spread to use separate fingers. That way, you divide up the work. You have one finger still lifting while the other's already starting the next press.

Usually for speed and avoiding strain you want to incorporate as many fingers as possible. In fact it's a common mark against dvorak online that "ls -l" is all typed with the right pinky (not an issue in the workman layout luckily).

Also remember this was typed with typewriters. That gives its own set of constraints. It's quicker to type two different characters than the same character twice in a row, as you need to wait for the typebar to return enough.

Using more fingers allows for faster typing.

w TAB in a properly configured emacs