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]

Re: gcj slower than JVM on RedHat/s390?


From: "Andy Faibishenko" <AFAIBIS at transunion dot com>

> 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).

>   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 suspect that the body of doSomething() or the call of the method is
eliminated by the IBM JIT compiler.  No statement in the above code
snippet does not depend on "b1.doSomething();". So, if the call has no
side-effect, the JIT may be able to eliminate the call.

  Kazuyuki Shudo	shudo at computer dot org	http://www.shudo.net/


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