strange performance (fwd)

Michael Koehne kraehe at bakunin.north.de
Mon Nov 16 19:37:06 PST 1998


Moin Jose de Oliveira Guimaraes,

> We have made some performance tests using Kaffe and got some strange
> results. 
> 
>    The tests were made using a code like:
> 
>           for ( i = 0; i < 100; i++ )
>             for ( j = 0; j < 1000; j++ )
>               x.m();
> 
> in which the method call was executed 100.000 times. The time was
> taken using Unix "time" program, column "user".

  never trust a benchmark, you hav'nt cheated yourself.

  Your benchmark is to simple, and to complicated at the same time.
  The time you'll get by the unix time command includes startup of
  kaffe and just in time compilation of your little code. Once the
  code is compiled for your native CPU, its so simple that its running
  in cache in a fraction of a second.

  Ok this is leading us to a problem - Kaffe startup. I've profiled this
  part a bit, and some time is consumed in loading of dynamic libraries
  and just in time compilation can take lots of time. Using the right kaffe
  with the right parts of libraries linked static, reduces startup by 2
  seconds on my 4dx33. Using the interpreter for "hello world" like
  programs gives an other speedup. I have'nt figured out how to build a
  kaffe that is able to jit and interprete at the same time, but I think
  that interpreting a method the first time, and jit'ing it the second
  can improve some smaller programs.

-- 
 mailto:kraehe at bakunin.north.de		http://human.is-bremen.de/~kraehe
		" CETERUM CENSEO MSDOS ESSE DELENDAM "


More information about the kaffe mailing list