Your issue is Mame not anything else…. MKs run bad/unplayable on all Mames other than the first one. MK 1 runs pretty much perfectly, at least on a Pi 2, on Mame4All. The rest are simply not playable. This is solely due to how Mame emulates games. Mame trys to emulate the hardware, perfectly, as it actually ran in the arcades, not to emulate it as fast as possible or as efficiently as possible. Because of it’s focus on accuracy, the hardware requirements to run games on Mame tend to be a lot higher than other emulators that support the same games.
My suggestion if you want to play the MK series, is to simply download them on another system. The SNES port of MK 2 IMO is actually better than the arcade as the AI is much more fair unlike the Arcade version which was programmed to cheat to make the arcades more money. You also have good ports on PSX of MK 3 and even SNES again. Hope that helps…