>   = From: Cliff Draper <[EMAIL PROTECTED]>
>   = Sent: Tuesday, December 19, 2000 10:35 AM

> > = From: David Brownell <[EMAIL PROTECTED]>
> > = Date: Mon, 18 Dec 2000 19:52:46 -0800

> > My own experience with GCJ is positive.  For many things it's
> > faster than Hotspot, and the startup time is where it ought
> > to be (invisible).  
> 
> Forgive my ignorance of GCJ, but I thought it precompiled the whole
> set of .class files into an OS executable and then ran that.  That
> would surely have a nonzero startup time.

I said "invisible", not "nonzero".  Let's say that while I perceive
JDK 1.3 taking a long time to start producing output, I perceived
none with GCJ.  Annoying delays for JDK 1.3; pinkie not yet lifting
from the "ENTER" key when the GCJ program began its first output.

And related:  I normally observe output with JDK 1.3 to be bursty.
Again, not so with GCJ -- smooth.  Perhaps if Hotspot were to cache
all of its pre-optimized code (as GCJ does :-) it would do as well.

Though GCJ 2.96 won't compile quite all inner classes correctly from
the Java source (presumably fixed in recent GCC snapshots), I'd not
say that GCJ "only" precompiles from class files.  As I understand,
an artifact of the current classfile parsing (it doesn't create parse
trees of any kind) is that you get better optimization when parsing
from source code (those parse trees support more optimizations).


> > Think of GCJ as an ahead-of-time JIT (!) that's Free Software,
> > uses all the optimizations available to GCC 3.0, and moreover
> 
> Taking advantage of gcc optimizations sounds like a good thing.  But
> how does it deal with dynamic class loading; for instance, you can
> bring a new class into a running system that has a different behavior
> that it's parent class, but code that uses the parent class doesn't
> know which its using?

When you invoke Class.forName() you get an object that's bound to
the bytecode interpreter through its vtable.  (Or so I recall it
being explained.)  Once the caller makes the invocation, it won't
know if it's interpreted, compiled, jitted (etc).

- Dave

 


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to