please disregard half my previous post

Michal Cierniak cierniak at
Fri May 16 09:54:48 PDT 1997

Per Bothner writes:
>> Is there any reason that the following methods take so long to compile?
>> java/lang/Character.<clinit> -- 4656 ms
>This method is huge - anout 60kB.  When compiling, Kaffe allocates
>a struct per instuction, which ends up eating 10MB.
>Tim is planning on fixing this, but says it is non-trivial.

The comment below doesn't address the issues of long methods in
general, but it should fix this particular problem...

It's probably an obvious suggestion, but since <clinit>'s are executed
only once, it may make sense to interpret those methods instead of
compiling them.  I would expect that the increase in the VM's footprint
by having both the the jit and intrp engines shouldn't be a major
problem (?), but it's probably tricky to maintain a coherent state of
the VM if interpreted and compiled methods are mixed.

Of course there's also a potential problem that some <clinit> methods
may do some non-trivial computation and it would be beneficial to
compile them even though they are being executed only once.

Michal Cierniak               cierniak at

More information about the kaffe mailing list