Originally posted by Mike Yu:
Hi,
In addition to the interpreted language, what are other reasons that cause Java run more slowly than C++?
Originally posted by Corey McGlone:
The fact that Java is interpreted really is the reason Java runs more slowly than a fully compiled language than C++. The fact that each line must be interpreted and then executed makes the language inherently slower than a language that is fully compiled and requires no interpretation. Of course, this does provide Java applications with greater portability than those written in C++.
Corey
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
"I'm not back." - Bill Harding, Twister
"I'm not back." - Bill Harding, Twister
Originally posted by Thomas Paul:
And to tell the truth I haven't seen any performance comparisons between a Java app and a C++ app that would make say that C++ is faster. I think Java is just as fast and sometimes faster that C++.
----------------------<br />regards.<br /><a href="http://www.mantrotech.com/editors/gaurav_mantro.asp" target="_blank" rel="nofollow">Gaurav Mantro</a><br /><a href="http://www.mantrotech.com/technology/java/index.asp" target="_blank" rel="nofollow">Java Information Portal</a> - <a href="http://www.mantrotech.com/technology/java/index.asp" target="_blank" rel="nofollow">http://java.mantrotech.com</a>
Originally posted by Gaurav Mantro:
My understanding is that Java is slower as comparision to C/C++. Reasons are being an interpreted language, safety issues etc.
Originally posted by Charlie Sturman:
Jos,are you going to maintain both code bases
Originally posted by Jos Horsmeier:
I started rewriting the whole shebang in C++ ... I had to come up with a reference counted memory management scheme, I had to defer the dynamic class loading elegance to a silly dlopen()/dlsym() kind of mechanism etc. etc. After six! months the rewrite was complete. The original +- 300 KB of .class files were replaced by more than +- 900 KB of .so files (don't you love those multiple template instantiations all over the place) and the grand result was: The Java version turned out to be just a meager 20% slower than the brand new C++ version ... and that exercise took me six months ... *sigh*
kind regards
Don't get me started about those stupid light bulbs. |