[kaffe] Optimization?

Dalibor Topic robilad at yahoo.com
Mon May 27 10:38:27 PDT 2002

Hi Jukka,

I guess that it all depends on the application at
hand. I tested with kjc compiling Klasses.jar using
the -prof option on i386-linux with jit3. In that case
the most popular method in HashMap is bucket. Most
time is spent in the put method. The total time spent
in HashMap methods is less then 5 % of the total
running time :( . Is there a specific application that
you are referring to?

I, too, would like to see more performance
improvements to kaffe's libraries. However, I'm not
sure if manual method inlining is the way to go. Here
are my reasons: 

a) it can already be done by bytecode optimization
b) it duplicates code, making eventual maintenance

I'd prefer to see a generic Klasses.jar that simply
works, and different Klasses.jar's for download on
kaffe.org for specific needs: a size optimized one and
a speed optimized one. Both kinds of optimization
could be done automatically by bytecode optimization
tools. I've tried different bytecode optimizers today,
and I'd say that javago does nice inlining, and jopt
can nicely sqeeze a few bytecodes out of HashMap,
especially out of bucket. Finally, soot is quite good
at reducing the stack size needed to run a method. I'd
recommend looking at this trio to automatically
improve the performance of kaffe's libraries.

Java Global Optimizer :
JOpt :
Soot : http://www.sable.mcgill.ca/soot/

Regarding relative speed benefits of different
optimizations: I think the easiest way to find out
would be to write some code that excercises different
optimizations and post it on the mailing list for
others to take a look at it, and report their results.
Could you write a few classes that extend HashMap and
implement the optimizations you proposed?

Regarding benchmarking: I would still like to see it
coming to kaffe.org, you just need to push me harder
;) I've taken a look at ashes, and it kind of works
for me: I had some trouble with getting the scripts
and paths to work correctly. I'm also looking at IBM's
jMocha, that seems to work well (except for result
analysis, our serialization seems to have some bugs
that are triggered by it). I also looked at coffeine
Mark 3.0, that one works well with kaffe, but isn't
open source or free software. Did you find time to
take at look at a specific benchmarking toolkit?

best regards,


Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup

More information about the kaffe mailing list