This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: class initialization check overhead
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Kresten Krab Thorup <krab at trifork dot com>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 25 Oct 2002 00:06:39 -0400 (EDT)
- Subject: Re: class initialization check overhead
On Thu, 24 Oct 2002, Kresten Krab Thorup wrote:
> if (!_initialized_org_gnu_foo_MyClass) {
> _Jv_InitClass(&_gnu_foo_MyClass, &_init_gnu_foo_MyClass;);
> }
Sure. It would improve on the current init check. But even
this adds quite a bit of complexity to small static methods (e.g.
leaf functions).
I did some experiments to see how small and fast a gcj-compiled
application could be. With a modified generational GC, whole-program
inlining and other performance hacks it runs my tests about as fast as
Hotspot. Though it is considerably smaller in runtime footprint (when
built statically).
> It seems to me that this would be more portable than using traps.
Certainly. It might turn out that my idea doesn't help much at all
anyway. I still think it would be an interesting experiment however.
Jeff