VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

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

Reply 1 of 1, by superfury

User metadata
Rank l33t++
Rank
l33t++

My 4.0GHz Intel i7 4790 currently gives 8086 MIPS ratings of up to 1.93 average with my latest commit.

When set to Unlimited mode (locks to a high amount of IPS)
General Instructions: 1.58
Integer Instructions: 2.86
Memory to Memory: 2.00
Register to Register: 2.65
Register to Memory: 1.55
Performance Rating: 1.93

When set to Limited mode (locks to 333333IPS):
General Instructions: 0.88
Integer Instructions: 1.51
Memory to Memory: 1.04
Register to Register: 1.37
Register to Memory: 0.81
Performance Rating: 1.02

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io