This is the mail archive of the java@gcc.gnu.org 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]
Other format: [Raw text]

gcj slower than JVM on RedHat/s390?


I have a small test program which I use as a benchmarking tool.  It
doesn't use 
threads/jdbc/etc.. - i.e. plain vanilla java code.  When I compiled it
with GCJ I 
was surprised to find that it takes up almost TWICE as much CPU time as
the JVM 
version (as reported by the time command).  I am trying to figure out
why this is.  

The environment is RedHat Linux for s390 (mainframe) 2.4.19 (I believe
this is the latest beta)
The gcc version is 3.2.2
The jdk version is 1.4

The structure of the code is simple

  A a1 = new A();
  A a2 = new A();
  for (i = 0 to 10000000)
  {
     B b1 = new B(a1,a2);
     b1.doSomething();
  }

  The doSomething() method performs a bunch of string comparisons and
assignments.  Nothing tricky.

  I've tried compiling from both .java and .class files with no major
differences.  I'm using -O3 to make sure that the code is optimized. 
I've looked at gprof traces to make sure that the time is not spent is
some weird place and it doesn't seem to be.
I've tried to specify -ms and -mx options but I get the error : jc1:
unrecognized option `-fms=1M' even though the docs say it should work.

Any suggestions would be greatly appreciated.








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