Speed Impact experiment on GCJ

Andrew Haley aph@redhat.com
Tue Feb 14 17:01:00 GMT 2006


Rui Wang writes:
 > Hi, 
 > 
 > I did a simple test to analyse the speed impact of using GCJ between
 > java bytecode and native machine code. 
 > But the result looks not very promising, the data below shows that there
 > is rather large decrease of speed instead of increase. 
 > I couldn't figure out why, any suggestions are appreciated. 
We can't figure out why either, becasue your test uses the files
task.test, servers.d, and result.d, none of which you provided.
 > For Impl.java
 > public class Impl implements IFace {
 > public Impl(){
 > }
It's quite possible that an optimizing compiler will be able to figure
out that this is not really a loop:
 > public int ping(int i, int j) {
 > 	int count= 0;
 > 	for(int n = 0 ; n < i*j; n++)
 > 		count++;
 > 	return count;
 > }
 > }
Andrew.


More information about the Java mailing list

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