Vim define a macro (stored in q because it is easiest, but to change the name replace the second q with any letter):
qq<do stuff>q
Emacs define a macro: C-x ( <do stuff> C-x )
Vim do that macro again 40 times: 40@q
Emacs do that macro again 40 times: C-u 40 C-x e
Naming a macro in Emacs (so you can have multiple) takes even more keystrokes and I'm not entirely sure on the incantation to repeat a macro from name - none of the help files seem to tell me how to do this, only to save it.