Here is some points:
I think RetroPie pulls the master branch from the repository. The ric_dev branch is usually slightly faster but more likely to have errors.
To get the best performance you should do the following:
1. Overclock the Pi to its maximum stable speed (use ‘sudo raspi-config’ )
2. Run mupen64plus using sudo/root so that it can change its scheduler policy to ‘hog’ the CPU
3. Use 128Mb GPU/CPU memory split. The current code doesn’t force the kernel to keep pages in ram so if the split is too high, then pages will be swapped and slow emulation down. (Fix coming soon)
4. Run mupen64plus without the desktop (use Ctrl+Alt+F1; [log in]; sudo telinit 2)
5. The video-gles2n64 plugin is the fastest so use it if it works with the ROM you want to play.
6. Modify mupen64plus.cfg as detailed in other posts and in the repo wiki (Although it needs more detail)