Why C++ is faster than Java?
How java can be made as fast as C++?
Why C++ is faster than Java?
How java can be made as fast as C++?
We all are the components of a huge program...... the programmer is always debugging us with His debugger.
Java is an interpreted language. In other words, Java doesn't compile into machine code. It is compiled into a platform independent set of byte codes, that are executed by the Java virtual machine.
There are Java compilers that can compile Java into machine code (thus losing it's platform independence). These compilers still have to compile in a garbage collector - which in some instances, can still make Java slower than C++.
Java with the help of a VM with a JIT compiler can reach speeds of up to 15% slower than C++, which is really good considering all its language features like GC and full OOP.
But what they are trying to make it as fast as C++ ???
>But what they are trying to make it as fast as C++ ???
Most people want a language that has very fast execution...
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
1.Performance Evaluation: Java vs C++
2.Comparative Performance Analysis of Client-Server Applications developed in Java and C++
3.An empirical comparison of C, C++, Java, Perl, Python
I guess above resouces will help you to resolve ... You will find the third one as the best for analysis. One more thing, I guess this thread should be in GD.
4.Optimizing Java for Speed
Welcome to cboard !!! Happy to see you from Bangladesh, rare to find Bangladeshies interested in C/C++ .
Last edited by zahid; 03-17-2003 at 07:13 AM.
[ Never code before desk work ]
-------------------------------------:-->
A man who fears Nothing is the man who Loves Nothing
If you Love Nothing, what joy is there in your life.
=------------------------------------------------------= - I may be wrong.
Salam Zahid Bhai!
Actually I am C/C++ programmer and know little Java! I am a newcomer to java and I am finding it slower than the C/C++ that's why I first thought "Is java going to be faster or not!"
But Many many thanks for your such good links!
If I go to Dhaka I will meet you can you give me your address
Last edited by Moni; 03-19-2003 at 01:36 PM.
We all are the components of a huge program...... the programmer is always debugging us with His debugger.
_
The knack of flying is learning to throw yourself at the ground and miss.
bios: i have no clue what your thing a ma bob was for.
Actually Java doesn't support full OOP, it doesn't support multi level inheritance, and that's all I know about Java.and full OOP.
i.e you can't do:
class Waste {
}
class Poop : public Waste {
}
clas Diarrhea : public Poop{
}
Multiple inheritence is about as good a practice as using goto's - you should only use it when it really, really makes sense. And even then it can be done other ways.
Notice also that the "goto" keyword has since been removed from Java.
gg
The stupidity of this thread. Has been done before. This is a C/C++ board not java...making this thread pointless!bios: i have no clue what your thing a ma bob was for
Java is a multi platform language which makes it slower. And if I'm correct... it doesn't have pointers (correct me if i'm wrong). So...whats the use of Java? other than writing applets and other web stuff.
Multiple inheritence is quite usefull whem used correctly and in the right placesMultiple inheritence is about as good a practice as using goto's - you should only use it when it really, really makes sense. And even then it can be done other ways
The knack of flying is learning to throw yourself at the ground and miss.
And so are gotos!Originally posted by biosninja
Multiple inheritence is quite usefull whem used correctly and in the right places
Seriously though, I think C++ is better than JAVA cuz it has multiple inheritance, it's faster, and has gotos.
Java has its place on the web (like clones of pong and space invaders), but for 90% of other stuff, C++ is better.
L33t sp3@k sux0rz (uZ it t@k3s 10 m1|\|ut3s 2 tr@nzl@te 1 \/\/0rd & th3n j00 h@\/3 2 g3t p@$t d@ m1zpelli|\|gz, @tr0(i0u$ gr@mm@r @|\|d 1n(0/\/\pr3#3|\|$1bl3 $l@|\|g. 1t p\/\/33nz j00!!
Speling is my faverit sujekt
I am a signature virus. Add me to your signature so that I may multiply.
gotos should only be used when there is absolutely NO way outAnd so are gotos
The knack of flying is learning to throw yourself at the ground and miss.
Java does have a limited form of gotos
(but not using the keyword "goto"
here is some Java code
just a made up example, but it does show that Java allows for a large amount of gotos functionality.Code:outerLoop: while(true){ innerLoop: for(int i = 0 ; i < MAX ; i++){ foo += 45; test: if( foo % 88 == 3 ){ break outerLoop; } else if( q == r ){ if( s == w ) break test; } else { continue innerLoop; } } }
You are always welcome.Originally posted by Moni
If I go to Dhaka I will meet you can you give me your address
I sent you a pm, I guess you have already got it.
Last edited by zahid; 03-22-2003 at 11:07 PM.
[ Never code before desk work ]
-------------------------------------:-->
A man who fears Nothing is the man who Loves Nothing
If you Love Nothing, what joy is there in your life.
=------------------------------------------------------= - I may be wrong.