cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl versus JAVA performance

From: Kjell Ericson <Kjell.Ericson_at_haxx.se>
Date: Tue, 24 Jul 2007 22:11:27 +0200 (CEST)

On Tue, 24 Jul 2007, Robert Iakobashvili wrote:

> The JAVA fans were confident, that the modern JDK 1.5 JAVA has at least
> the same if not better performance.

Java people keeps saying that and provide theoretical examples and practical
examples like "look, this C program compiled for a 286 processor runs slower
than a JIT compiled Java program on a Pentium XXX".

This "argument war" will continue because C-people and Java-people talks about
different sides of the issue. Java is never faster if:
* The processor is known when compiling a program.
* The program doesn't loop around in the same code so the optimisation is
gained after the JIT.

> If somebody on the list has benchmarked or tried HTTP and HTTPS both with
> JAVA and libcurl based implementations?

I doubt that benchmark exist. But you can always read this page:
  http://www.kano.net/javabench/

As almost stated, having a library (as libcurl) on your system gives you
perfect opportunity to have that library compiled for the processor on your
machine. The question is then not to compare C/C++ and Java, but comparing
libcurl code + gcc and JDK code. The differance must be hugh if Java shall
win that battle.

But telling the Java fans this will not convince them. For each and every
program will they find one small "advantage" for Java that will make Java much
better than every other programming language (mostly because Java fans don't
know any other language :-).

  // Kjell
Received on 2007-07-24