Go Vegetarian

Go Vegetarian

Tuesday, January 06, 2009

Java is not slow !

Like the author of the following
The Java is Faster than C++ and C++ Sucks Unbiased Benchmark

I am sick of hearing from time to time people saying that Java is slow...

I did a simple test on my Toshiba laptop running Solaris 10 x86 and please look at the figures...
I do not find fair to spread that Java is slow... It is not true anymore(maybe was at the beginning but not true anymore).

JAVA
vegan:rudy ~/Data $ time java -Xms128M -Xmx256M hash 1000000
99999

real 0m1.676s
user 0m1.469s
sys 0m0.119s

C++
vegan:rudy ~/Data $ time ./a.out 1000000
99999

real 0m4.610s
user 0m4.419s
sys 0m0.150s

-rudy-

No comments: