All credit to user Otto, who found this: https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=108006
iMame4All has slowdown in some games because it posts too many error messages to the console. eg Robotron 2084 (note: you have to select ‘Content Settings’ > ‘Restart Content’ in the retroarch GUI after you get the “Factory Settings Restored” message, else it will hang) – you’ll notice that when the player spawns at the start of the game, it slows to a crawl. The reason for this is it’s logging a load of error messages to the console.
If you instead amend /opt/retropie/configs/mame-mame4all/emulators.cfg to
lr-imame4all="/opt/retropie/emulators/retroarch/bin/retroarch > /dev/null -L /opt/retr(etc...)
…it doesn’t display these messages, and the game plays flawlessly. Apparently this affects other games (outrun, others?)
I’ve logged an issue both with iMame4All-libretro, and Retropie, so hopefully a fix will eventually be made, but if you don’t care about error messages and want to use a libretro mame emulator, go ahead :)
Logged issue:
https://github.com/RetroPie/RetroPie-Setup/issues/906