Skip to content

Comment on Hello World execution timeparent

Comments

Uh, if you think gcj is going to beat sun's javac/java, you're mistaken.

Again, with the rapid unexplained downvotes... seriously, did you see the article about speeding up Eclipse? The suggestion was to make sure you're not using gcj and others commented that they agree'd. It's well known the gcj is just flat slow compared to Oracle's/OpenJDK.

lol, whatever guys, pile on, I must be missing the joke!

The OP was talking about program startup time and measuring that by comparing hello world programs. When I run the above hello world program compiled with gjc is 25% slower that the C program. Compare that with the OP's measured version being 300 times slower than the C version when compiled with Oracle's JDK.

Eclipse is not representative of a typical command line program. Write "ls" with the OpenJDK and tell me you don't pull you hair out waiting for it to start up when using it.

When you use gcj, you lose the benefits of JIT compilation and other such optimizations. This is why gcj might be slower than Oracle's JVM / OpenJDK.

But I can see how compiling a simple program with gcj could make it faster.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.