> You're racing a JIT-compiled Java implementation against a hand-
> written assembly implementation of the very same thing.  The asm
> version is going to win.

Yes, but not by three orders of magnitude. An old rule of thumb was
that hand-crafted assembly is a factor two faster than compiled C
code, and Java tends to be a factor two or so slower than C, obviously
depending on compiler quality, but then we still stay within one order
of magnitude and do not sacrifice three orders of magnitude.

> A more interesting race would be to see if the JIT-compiled library
> implementations of the underlying VM provide a speed boost.  A
> benchmark that did a lot of string manipulation might end up being
> closer because it spends more of its time in library code that the
> interpreter doesn't touch.

Maybe, but I'm personally more interested in the things for which
Android has *no* corresponding library code, such as vector math on
long vectors, or looping over self-defined algebraic expressions,
because that is the stuff that is time-critical for me, with 5-10
times faster processing in Java ME with JIT than with Android Dalvik,
on comparable hardware.


On Apr 3, 8:30 pm, fadden <[email protected]> wrote:
> On Apr 3, 2:45 am, blindfold <[email protected]> wrote:
>
> > Thank you, Koji, these are interesting figures. Apparently the Java
> > interpreter for Dalvik bytecodes adds two to three orders of magnitude
> > computational overhead. Do you think that this is avoidable through a
> > further engineered redesign of your Java Dalvik VM?
>
> You're racing a JIT-compiled Java implementation against a hand-
> written assembly implementation of the very same thing.  The asm
> version is going to win.
>
> A more interesting race would be to see if the JIT-compiled library
> implementations of the underlying VM provide a speed boost.  A
> benchmark that did a lot of string manipulation might end up being
> closer because it spends more of its time in library code that the
> interpreter doesn't touch.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/android-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to