Re: Java's poor performance

Shawn Silverman <[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
I often find that the initial "slow" speed of many Java applications, 
especially those that run on embedded systems, is due to the design of 
the program itself, and not "Java".  It is possible to design programs 
that easily hit the limits of an 8-bit processor, whether written in 
Java or not.

As far as your realtime woes, not many systems advertise "realtime" and 
deterministic performance.  I would not expect this kind of behaviour 
out of a TINI.  I would out of one of the aJile boards, a JStik, for 
instance.  Again, this is a design issue, not a Java issue.

Your point about interpreting Java bytecodes being the same as C is 
incorrect.  The code is not cached on a TINI.  The interpreter is 
always running.  With a C program, the code is executed directly.

Just some points for the group to chew on.

Regards,
	-Shawn

On 25-Apr-04, at 8:25 PM, Fred wrote:

> 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

_______________________________________________
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.