Java's poor performance

"Fred" <beagle2-h4u632SxQnhWk0Htik3J/[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>

Hi all,

I am completing a university project about Java in embedded systems.  I have developed a realtime data acquisition system in Java (but I had to do the deterministic scheduling using a native ISR).  
I am very curious to know why exactly Java takes so long to do even simple things like assigning the values in an array.  I know it's only an 8-bit microcontroller and this means that the bytecode translates into more machine instructions than on a PC.  But this is the same with C!!!
The difference in execution times is huge.   The interpreter overhead shouldn't be as much as it seems to be.  I would have thought an interpreter simply needs to translate the bytecode into machine code at run-time.

Why is Java so slow?
Is it because Java interpreters are very inefficient and hence translate the bytecode into many machine instructions?
...or is is because of the garbage collector which keeps interrupting?
...or is it because there are many instances of the interpreter sharing the cpu?

Thanks in advance to all you coffee-sipping geeks  ;-)

Fred

Sick of spam? Fadmail (www.fadmail.com) recommends using SpamCop (www.spamcop.net) for reporting spam!
_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.