This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

performance problems


Hello,

thanks for the many replies and infos to my 'performance problems' posting!

On the weekend, I finally had some spare-time to run some more tests.
While some simple apps show good performance (see below), memory-intensive 
apps still show the factor-of-five-slowdown I reported last week.
As others don't see this behaviour, my Linux configuration is probably
broken somewhere... 

Thanks again for your replies, and to Cygnus for providing gcj/libgcj!

- Norman

Norman Hendrich, hendrich@informatik.uni-hamburg.de



---

Here are a few user-time results from running the ShellSort algorithm
on random data (gcj/libgcj 2.95, Linux 2.2.5, glibc 2.1). This is an
example of a single-thread program which ideally should approach C-code
performance:

 data size    runtime [sec]
              gcj -O3        IBM JDK1.1.6      Blackdown JDK 1.2prev2

     1.000     0.12           0.53              0.88
    10.000     0.48           0.82              1.14
   100.000     5.71           7.38              6.44
 1.000.000    89.0           96.8              76.0

Obviously, gcj performance looks competitive on my system after all. The
small startup time of gcj code is especially promising for 'small apps'. 
Also, this is one of the few apps where the sunwjit-compiler used in the 
JDK 1.2 seems to work...

However, there is a catch to this numbers:

gandalf> time ./a.out 100000
Shellsort self test started...
...generating random numbers...
...sorting...
...checking...
ok.
6.890u 0.050s 0:13.68 50.7%     0+0k 0+0io 456pf+0w

Note that the total runtime of the app is double the reported user-time
(the runtime is a little longer because this time I didn't use the -O3 flag).
It seems that the gcj code always forks a second process (is this the 
garbage-collector?) which on my system uses as much CPU as it can get -
in this example, 50%. Is this GC behaviour normal?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]