Hi,
I decided to do something similar to what Ziga had done. I took his
HelloWorld.java [1] and compiled it with three incarnations of ecj:
1. java-gcj-compat's javac
2. an ecj made as in [2]
3. an ecj made as in [3]
Quick and dirty results (see [4] for details):
(average of 5 runs)
| j-g-c's javac | ecj (from .java) | ecj (linked)
-------------------------------------------------------------
real | 1.1724 s | 0.2812 s | 0.3804 s
user | 1.0576 s | 0.217 s | 0.313 s
sys | 0.1144 s | 0.0636 s | 0.0672 s
I've attached the raw output of the time commands for all three tests.
Andrew
[1]
http://www.bootchart.org/misc/ecj/HelloWorld.java
[2] Note: this took a _long_ time ... maybe I did something wrong?
(in an exploded Eclipse source tree (after rpmbuild --short-circuit -bp on
our eclipse.spec) in plugins/org.eclipse.jdt.core/compiler:
gcj -o ecj -I. --main=org.eclipse.jdt.internal.compiler.batch.Main -O2 \
`find -name \*.java -print0 | xargs -0`
[3]
gcj -O2 --main=org.eclipse.jdt.internal.compiler.batch.Main \
-Wl,-R,/usr/lib/eclipse/plugins/org.eclipse.jdt.core_3.1.0 \
/usr/lib/eclipse/plugins/org.eclipse.jdt.core_3.1.0/jdtcore.jar.so \
/usr/lib/eclipse/plugins/org.eclipse.jdt.core_3.1.0/jdtCompilerAdapter.jar.so \
-o ecj.linked
[4]
export CLASSPATH=/usr/share/java/libgcj-4.0.0.jar
time <compiler> HelloWorld.java