"Sean Russell" <ser / germane-software.com> schrieb

> I've been playing with GCJ, the Java-to-native compiler.

[...]

> The important thing to note is that this is a VERY small app, so startup
> delays are disproportionately weighted.

[...]

> TOTALS (TIME)
>   ./edt_java: 2.22
>   ./EDT: 0.33
>   edt: 0.18

> The big surprise here is that Ruby is so fast.

I'm really surprised by your test results.  For every benchmark I did on
Java and native code compilation, the native code was often close to the
performance of the 1.4 server VM but seldom faster.  The startup performance
wasn't that different.  I never used GCJ but Excelsior JET which is a very
sophisticated native code compiler.  The last time when I tried GCJ 2.x, it
generated very poor code and was suffering from an all-too-simple garbage
collector.  Typical startup times for a java command line application
(jscheme) is about 0.4sec, regardless whether JET-compiled or not.

It's good to hear that Ruby is so fast.  I don't have a scheme interpreter
written in Ruby to compare it to jscheme :-) but starting up ruby, but to
have some numbers to compare, a

 time ruby -e 'require "cgi"; exit 0'

to simulate a startup, some library initialization and a shutdown needs
~0.29s on my system.  Without the require statement, which you might
consider unfair, the time is reduced to ~0.10s.

A simple java program, which does nothing but System.exit(0) takes - I
always measure the average between 3 calls after doing one call to warm up
the system - 0.36s to run.

It might be a stupid idea to native-code compile that java program, but if I
run it through JET 2.5 personal, it results in a 6k executabel with needs
0.65s to run.  So, this is twice as slow as the Java version.

What kind of program did you benchmark?  Which where the hot spots in code?
Did you profile your code?  What's the memory consumption?  How many time
does it spend in garbage collection?

It's interesting to see Ruby winning the benchmark, but I'm afraid, that's
not a typical result.

One of my jscheme java benchmark can be found here ->
http://groups.google.de/groups?hl=de&threadm=a9kqgf%24j8b%2402%241%40news.t-
online.com&rnum=1&prev=/groups%3Fq%3Djava%2520benchmark%2520stefan%2520matth
ias%2520aust%26hl%3Dde%26sa%3DN%26tab%3Dwg but it's all in German.  Based on
that, I also compared Java and C#, which you can find here ->
http://lists.ximian.com/archives/public/mono-list/2002-April/005200.html.
This is all English.

bye
--
Stefan Matthias Aust   //
www.3plus4software.de // Inter Deum Et Diabolum Semper Musica Est