[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GCJ and C/C++ applications how is it possible ?



On 2002.05.24 04:25 Pac wrote:
Le 23/05/02 à 22:09, dman a écrit:
dman> On Thu, May 23, 2002 at 07:15:34PM +0200, Pac wrote:
dman> | why ?
dman>
dman> Layers upon layers upon layers of indirection.  The JVM
interprets
dman> java bytecode.  It then delegates the "native" methods to some C
code
dman> (from the java-gnome project).  Those C/C++ functions then
invoke some
dman> other C/C++ functions and so on.  Each has overhead.  Then you
have
dman> your callbacks.  In Java "callbacks" are always wrapped in
classes
dman> (java is not OO, it is Class-O).  When you pass a callback to
the
dman> java-gnome stuff it must do the necessary wrapping/unwrapping to
dman> provide a C-level function pointer to the underlying GTK+ system
and
dman> marshall arguments back and forth.  More overhead.  The
java-gnome
dman> package must also keep track of all GTK+ widgets it creates so
that
dman> when the JVM's GC decides it is time to free it it can.  That's
more
dman> overhead in storing references.
dman>


this is the scenario when java-gnome is not nativly compiled isn't it
? With a native compilation which is possible with gcc, the
application should be faster.


I would love to be proven wrong, but far as I know, the main advantage of natively compiled Java, is that the java bits will run faster than their interpreted counterparts. You're still going to encounter the overhead of setting up the JNI stack and passing references back and forth.


HTH,
Ian


--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: