Message from discussion Port EMU 48 to Palm OS?
From: Ivan Cibrario Bertolotti <cibra...@iriti.cnr.it>
Subject: Re: Port EMU 48 to Palm OS?
Date: 16 Jan 2002 12:00:08 +0100
Organization: IRITI - National Research Council - Turin (Italy)
References: <F6D08.email@example.com> <firstname.lastname@example.org> <email@example.com> <3C453470.422CB840@iinet.net.au>
X-Newsreader: Gnus v5.5/Emacs 20.2
Colin Croft <ccr...@iinet.net.au> writes:
> Please excuse my ignorance if I'm making an obvious mistake here as I've
> never programmed in Java. But my understanding is that Java is supposed
> to be able to run on any machine with minimal software modification - so
> why has no-one ever written the emulator in Java and solved the problem of
> platforms for it once and for all?
You are quite correct in theory; however, in my opinion, the
main issue in a Java emulator would be performance.
From my personal experience with the saturn emulator I wrote
(Unix OS, RISC CPU), the overhead of an emulator written in C roughly
slows down the CPU clock speed by an order of magnitude.
For example, my emulator runs a saturn CPU at an apparent
speed of 8-10MHz on a 100MHz Alpha CPU, assuming there is no paging;
things get worse on CISC CPUs, partly because I wrote the code with a
RISC CPU in mind.
Simple, interpreted implementations of the Java virtual
machine like the ones to be found on portable devices are likely to
slow down the emulation process by an additional order of magnitude;
at least, these are the figures I obtained when I attempted to
implement the main CPU ISA execution loop using JDK 1.0.2, Digital
Things should be better if the Java VM supports advanced
execution techniqus, like code mutation, just-in-time compilation, and
so on, but I have never checked this, so I cannot estimate how much
speed could be gained and I don't know if these optimizations are
feasible on a portable device. Does anyone have any clue on this?
With my best regards,
Ivan Cibrario Bertolotti / phone: +39-011-3919246
IRITI - National Research Council / fax: +39-011-341882
Turin (Italy) / mailto:cibra...@iriti.cnr.it