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: Jeroen Frijters
Subject: RE: [cp-patches] Patch: support for reading directories viaURL.openConnection()
Date: Fri, 10 Sep 2004 10:27:58 +0200

Archie Cobbs wrote:
> 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.

But the question on my mind is, is it fundamentally impossible for you
to elimate the check for classes that don't have a <clinit> or is that
just something you haven't implemented?

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

My (somewhat nasty) point is that I think we shouldn't be making
Classpath decisions based on missed optimization opportunities in some
VMs. I do realize that this is a gray area too.

Regards,
Jeroen




reply via email to

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