classpath-patches
[Top][All Lists]
Advanced

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

Re: [cp-patches] Patch: support for reading directories viaURL.openConne


From: Archie Cobbs
Subject: Re: [cp-patches] Patch: support for reading directories viaURL.openConnection()
Date: Thu, 9 Sep 2004 13:54:19 -0500 (CDT)

Jeroen Frijters wrote:
> > OK, I'm just pointing out that this is VM specific. For example,
> > because JC has a WAT compiler instead of a JIT compiler, and doesn't
> > try to do any fancy optimizations of "first active use", the presence
> > of a static initializer doesn't add any additional overhead at all.
> 
> Huh? When does the static initializer run and how do you determine if it
> needs to run?

Sorry, I meant overhead "beyond the time spent actually invoking <clinit>".

As specified, static initializers run on first active use. In JC,
each potential first active use checks whether the target class is
initialized, and if not, initializes it. So there is overhead to
do this check, but the checking overhead doesn't depend on whether
the target class actually has a <clinit> method or not.

There are some simple optimizations, e.g., any code class A never
needs to check for active uses of A or any of A's superclasses,
because the code couldn't be executing unless A was already initialized
(or initializing). Others may be added in the future.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]