class initialization check overhead
Adam Megacz
gcj@lists.megacz.com
Thu Oct 24 10:34:00 GMT 2002
Kresten Krab Thorup <krab@trifork.com> writes:
> Effectively, all <clinit> *must* run lazily, i.e. at the latest possible
Yes, this would be a "use-at-your-own-risk" optimization, like
-fno-store-check. Still, it would be pretty safe.
> The reason for this is that <clinit>'s may depend on one another, so
> it it not until runtime it can be determined if there are cyclic
> problems, and how they should be resolved...
Hrm, shouldn't this be determinable at link time? Of course the
linker doesn't understand Java and probably shouldn't. But it should
still be possible to delay it until program initialization time, thus
eliminating the need for the call at the beginning of every static
method.
- a
--
"Through your rags I see your vanity" -- Socrates
More information about the Java
mailing list