First post, by superfury
I'm trying to get my CPU speed faster on my x86 emulator, x86EMU. When running at a 4.0GHz CPU it's pretty fast, but on a 2.0GHz CPU it's running pretty slow atm (0.05-0.1MIPS, depending on the instruction (General=0.05MIPS, rest=0.09-0.1MIPS). I've reduced cross threading delays to a minimum afaik (There's two threads working atm: The main(CPU) thread and the Timer thread(handling hardware without strict timing, like the VGA and CMOS clock, screen refresh intervals etc.). All other stuff is handled in the CPU, which delays every X instructions and once per second (for emulator control purposes, like terminating the application or emulator reset).
Anyone has some good tips to improve the emulated CPU speed?
I'm trying to improve it with inlining much used functions and optimizing it further, but afaik (compared to Dosbox and fake86) it's still too slow (fake86 is about the same (although using a switch statement instead of my application that's using a lookup table) method of working, but it's way faster as far as I can see).
My project's at:
https://bitbucket.org/superfury/x86emu.git
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io