Message from discussion
Port EMU 48 to Palm OS?
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!newsmi-eu.news.garr.it!newsbo.news.garr.it!newsrm.news.garr.it!NewsITBone-GARR!area3.area.ba.cnr.it!not-for-mail
From: Ivan Cibrario Bertolotti <cibra...@iriti.cnr.it>
Newsgroups: comp.sys.hp48
Subject: Re: Port EMU 48 to Palm OS?
Date: 16 Jan 2002 12:00:08 +0100
Organization: IRITI - National Research Council - Turin (Italy)
Lines: 45
Sender: cibra...@brontolo.iriti.cnr.it
Message-ID: <ook7uiblxj.fsf@brontolo.iriti.cnr.it>
References: <F6D08.97920$va.45585798@news2.rdc1.mi.home.com> <a21mff$j3g$1@casey.uvic.ca> <88fc1a21.0201152256.35a260cb@posting.google.com> <3C453470.422CB840@iinet.net.au>
NNTP-Posting-Host: brontolo.iriti.cnr.it
X-Newsreader: Gnus v5.5/Emacs 20.2
Hello,
Colin Croft <ccr...@iinet.net.au> writes:
> Hi
>
> 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
Unix platform.
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
--
------------------------------------------------------------------------
Ivan Cibrario Bertolotti / phone: +39-011-3919246
IRITI - National Research Council / fax: +39-011-341882
Turin (Italy) / mailto:cibra...@iriti.cnr.it