gcj slower than JVM on RedHat/s390?

shudo@computer.org shudo@computer.org
Wed Apr 2 17:34:00 GMT 2003


From: "Andy Faibishenko" <AFAIBIS@transunion.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@computer.org	http://www.shudo.net/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /