strange performance
Jose de Oliveira Guimaraes
jose at dc.ufscar.br
Mon Nov 16 17:47:07 PST 1998
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".
The table below shows the time needed to execute :
- the null statement ";"
- an empty method "m1" of the class object "x" refer to
- an empty method "m2" of the superclass of the class of object x.
100.000 1.000.000 10.000.000
times times times
; 0.80 1.00 1.90
m1 0.87 1.12 3.93
m2 0.96 1.60 8.34
To execute m1 100.000 times, it takes 0.87 - 0.80 = 0.07 seconds. To execute
it 1 million times, it takes 1.00 - 1.12 = 0.12 s. To execute it 10 million
times, it takes 3.93 - 1.90 = 2.03. Each figure should be 10 times greater
than the previous one. But that never happens. We have made dozens and
dozens of tests and we always get this strange behavior. Note also that
to execute the null statement 1 million times takes only 25% more time
than to execute it 1/10 million times.
Can someone tell us what is happening ? We would thank !
Jose
Jose de Oliveira Guimaraes
jose at dc.ufscar.br
http://www.dc.ufscar.br/~jose
Computer Science Department
Federal University of Sao Carlos
Sao Carlos
Brazil
More information about the kaffe
mailing list