[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Linux Format: KSpread "disaster area"
From:       kent () mslinux ! com
Date:       2006-01-22 1:00:08
Message-ID: 20060121180008.mq953jab3i6scwc0 () mail ! aresnetwork ! com
[Download RAW message or body]

The same result, here's what I get for a C++ program.

#include <iostream>

int
main()
{
        std::cout <<"Hello, world!\n";
        return 0;
}

[zero@zero1 ~]# g++ hello.cpp
[zero@zero1 ~]# time ./a.out
Hello, world!

real    0m0.002s
user    0m0.002s
sys     0m0.000s
[zero@zero1 ~]#

Now for Java using gcj on the same machine:
class Hello{
        public static void main(String[] args) {
                System.out.println("Hello World!");
        }
}

[zero@zero1 ~]# gcj -c -g -O Hello.java
[zero@zero1 ~]# gcj --main=Hello -o Hello Hello.o
[zero@zero1 ~]# time ./Hello
Hello World!

real    0m0.049s
user    0m0.039s
sys     0m0.010s
[zero@zero1 ~]#

Can you provide me a convincing argument why my "Hello World" C++ 
program is so
much much much much faster than my java "Hello World" program?


Quoting Thomas Zander <zander@kde.org>:

> On Friday 20 January 2006 03:54, Boudewijn Rempt wrote:
>> The amount of time needed to load a jvm and run the smallest possible
>> java program* is about half a second**:
>
> To do the same on an open source JVM you have options to compile to native
> (using gcj) making the startuptime close to zero and I run the same
> program on the only open source jvm I happen to have installed (jamvm) in
> almost halve the time you report on using suns JVM.
>
> zander@dust:~$time jamvm Hello
>
> real    0m0.029s
> user    0m0.028s
> sys     0m0.000s
>
> In short; Java being slow is an outdated excuse.
> --
> Thomas Zander
>




_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic