Why is there a loss in processor power emulating 32bit programs on a 64bit system?

-3

May be a stupid question but I cannot find a clear answer.

Host CPU=Emulated CPU

Pentium Pro 200 MHz = 286 6 MHz

Pentium II 350 MHz = 386SX 25 MHz

Pentium III 1.0 GHz = 486 66 MHz

Pentium 4 3.0 GHz = Pentium 133 MHz

Core 2 Duo 3.3 GHz = Pentium II 300 MHz

Core i5 4xxx 4.0 GHz = Pentium III 500 GHz

according to this here

Tol

Posted 2019-10-15T02:29:10.460

Reputation: 1

1This makes no sense, as all the processors through the Pentium 4 *ARE* 32 bit. What emulation are you talking about *exactly?* – Keltari – 2019-10-15T03:20:25.157

Answers

2

This all depends on the emulator you are using. But the main point is that an Emulator is using software to do the job of hardware - ie it is not running the assembly code directly on the hardware, its doing it in software.

In other words, its not simply running 32 bit code on a 64 bit system (which does not really have an overhead), its actually software pretending to be hardware, which is abstracted away from the actual hardware)

davidgo

Posted 2019-10-15T02:29:10.460

Reputation: 49 152

2

Emulation requires the creation of a computer in software. This includes a CPU, memory and all the ancillary hardware necessary to make a computer that is as close to actual hardware as possible.

Every CPU instruction is examined and converted to the language used by the emulated CPU prior to being run on the host CPU. It is not the same as running code directly on the host CPU because the CPU is a software construct that is fully isolated from the host CPU.

That isolation makes it suitable for the emulated computer to be moved to any other system, even with an entirely different CPU type, because it is independent from the host CPU and depends only on the emulation software. The host CPU and the emulated machines can have wildly different CPUs.

This isn't "just" a 64-bit machine acting as a 32-bit machine, it is a 64-bit machine running an entire CPU in software on top of a real CPU.

The alternative to emulation is virtualisation. In virtualisation the software emulates only hardware and related interfaces around the CPU and not the CPU itself. Code is run directly on the host CPU resulting in near native speeds at the cost of requiring the same CPU architecture in the host and guest machine.

Mokubai

Posted 2019-10-15T02:29:10.460

Reputation: 64 434