Results 1 to 9 of 9
Thread: Hello from DanielStoner :)
- 04-23-2008, 09:56 PM #1
Hello from DanielStoner :)
I just joined this community today and I found it fun to browse through the topics and help here and there.
About myself, I am a software designer with some years of experience (say 17 oops this makes me feel ancient in this young world) and I started using Java in a consistent way about 9-10 years ago. But Java is such a vast field now that no amount of years can give one experience in all its aspects.
One of my reasons for joining is to try to get some feedback from community members about my programming oriented site (in blog form for now): Little Tutorials
Enjoy your cup of Java!
- 04-24-2008, 05:40 AM #2
Nice images by the side .. keep it up ..dont worry newbie, we got you covered.
- 04-28-2008, 09:14 AM #3
May I ask why you still program in Java. I understand its easier to write in then c++, but its also forty times slower.My IP address is 127.0.0.1
- 04-30-2008, 01:44 AM #4
Sorry Zosden but Java is not 40 times slower than C++. Again this is a myth from early days of Java 10 years back. Today Java is maybe 6-10% slower than C++ in benchmarks. But to get C++ that fast you have to be a real wizard. In practice the traps in C++ make the average programmer less efficient and also its code less efficient and more error prone. Keep in mind the average programmer in C++ has to compete with the programmers specialized in optimization techniques who implement the JVM and the HotSpot type compilers. While the C++ does a static compilation and the optimizations based on information available at compile time, the just in time compilers in Java have the opportunity to optimize the code based on information available at runtime. For example the compiler might decide to move a variable from the stack into a processor register for faster access if that variable is used a lot. In C++ you are stuck with what resulted from the static compilation. I believe on the server side at least Java makes programmers 10 times more efficient mainly because they don't need to manage memory. Also Java becomes faster and faster at runtime due to advancements in JIT compilers and the JVM. So this is why I still work in Java even if in the past I used for years C/C++. Keep in mind that when I started to use computers I had to use punched cards :) so I used lots of stuff probably nobody remembers about.
Last edited by danielstoner; 04-30-2008 at 01:46 AM.
- 04-30-2008, 02:29 AM #5
This is not true though. C++ can work directly with windows whereas Java has to always go through the JVM this extra step does make it slower. By the way have you ever used a program that was made in Java they are always slow and sluggish because of the extra step and the garbage collect whereas in c++ you end up with massive memory leaks if your inexperienced.My IP address is 127.0.0.1
- 04-30-2008, 05:10 AM #6
- Join Date
- Jul 2007
- Colombo, Sri Lanka
- Blog Entries
- Rep Power
Welcome to our community. :)
It's really nice to see a person like you here in our community. Your experience really helpful for all of our members. See around pal.
- 05-03-2008, 05:12 PM #7Member
- Join Date
- May 2008
- Rep Power
I remember punch cards
I remember punch cards stacks of them, cool neato stuff. Should have kept some of them for relics sake.
- 05-03-2008, 11:19 PM #8
Performance has many meanings. If you talk about startup time, yes usually a small Java application is way slower than a small C++ application because the whole JVM is loaded. But this is not an issue for most applications.
On the server side it doesn't really matter because the servers start once and they should run extended periods of time after that.
Java code also runs slower in the beginning while it is still interpreted by the JVM. If the operation is only executed once or just a few times then probably the JIT doesn't store the native code translation for later use.
On the other hand the important pieces of code that are run over and over are actually native code and they run very very fast. The JVM and the JIT do amazing things to your code at runtime so the performance of Java code is usually, in real world situations, better than C++ code.
Please read more on the subject before claiming that Java is 40 times slower than C++.
Here is a very instructive link: Java theory and practice: Urban performance legends, revisited
Another feature usually blamed for Java slowness is the garbage collector. But the reality is that most serious C++ applications use garbage collection libraries :).
- 05-04-2008, 06:48 AM #9
Zosden, your claim should be included with proof before your final judgment, the points daniel makes are clear. Finally, please take this debate to another sub-forum vs. an "Introductions" forum. This is not a way to welcome new members, even though I'm sure daniel has not minded the fun.
See you around daniel!