This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj slower than JVM on RedHat/s390?
- From: shudo at computer dot org
- To: java at gcc dot gnu dot org
- Date: Thu, 03 Apr 2003 02:04:01 +0900 (JST)
- Subject: Re: gcj slower than JVM on RedHat/s390?
- References: <se8ab8fe.071@tu_asynch_1.tuc.com>
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/