View Single Post
Old 01-25-08, 06:02 PM   #10
rhink
Registered User
 
Join Date: Jul 2005
Posts: 434
Default Re: Favorite IDE for Java

Quote:
Originally Posted by Zhivago
I speak every now and then with the original creator of jEdit on freenode IRC - cool guy. (I use Eclipse for the record.)

Also, why does the false belief that Java is slow compared to C++ continue to persist? That used to be the case, but not for some time... check out some performance benchmarks sometime you guys.

If it is slower in some cases, it is most likely due to bad programming practices like disregarding the cost of object creation.
Problem is a lot of API's SUCK HORRIBLY for object creation, and you can't really control that... in which case C++ will blow it away (stack allocation vs heap allocation). I've seen a single call to unpack CORBA objects create about a zillion tiny objects.... and consume a huge majority of that app's execution time, too. The design of java kind of encourages you to create gobs of little objects without really thinking about it. Swing is bloated and slow as well. If it's all code you can control, it's not too bad. But the biggest performance issue is the non-determinism of the garbage collector.... though even that can usually be beaten into submission with proper tuning. Java can usually be "fast enough" (esp in 1.5 and 1.6... performance of some code I was working on doubled when we moved from a 1.4 jre to 1.5), though it's real difficult to get a direct, 1:1 comparison for performance, since it's not like you can just recompile your java code with a C++ compiler using all the same API's and such.
rhink is offline   Reply With Quote