Results 1 to 9 of 9
  1. #1
    danielstoner's Avatar
    danielstoner is offline Senior Member
    Join Date
    Apr 2008
    Location
    Canada
    Posts
    191
    Rep Power
    6

    Default Hello from DanielStoner :)

    Hi everybody,

    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!
    Daniel @ [www.littletutorials.com]
    Language is froth on the surface of thought

  2. #2
    roots's Avatar
    roots is offline Moderator
    Join Date
    Jan 2008
    Location
    Dallas
    Posts
    293
    Rep Power
    7

    Default

    Nice images by the side .. keep it up ..
    dont worry newbie, we got you covered.

  3. #3
    Zosden's Avatar
    Zosden is offline Senior Member
    Join Date
    Apr 2008
    Posts
    384
    Rep Power
    6

    Default

    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

  4. #4
    danielstoner's Avatar
    danielstoner is offline Senior Member
    Join Date
    Apr 2008
    Location
    Canada
    Posts
    191
    Rep Power
    6

    Default

    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 12:46 AM.
    Daniel @ [www.littletutorials.com]
    Language is froth on the surface of thought

  5. #5
    Zosden's Avatar
    Zosden is offline Senior Member
    Join Date
    Apr 2008
    Posts
    384
    Rep Power
    6

    Default

    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

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    Hi Daniel,

    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.

  7. #7
    aquaman is offline Member
    Join Date
    May 2008
    Posts
    2
    Rep Power
    0

    Default I remember punch cards

    I remember punch cards stacks of them, cool neato stuff. Should have kept some of them for relics sake.

  8. #8
    danielstoner's Avatar
    danielstoner is offline Senior Member
    Join Date
    Apr 2008
    Location
    Canada
    Posts
    191
    Rep Power
    6

    Default

    @Zosden,

    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 :).
    Daniel @ [www.littletutorials.com]
    Language is froth on the surface of thought

  9. #9
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    Welcome daniel.

    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!
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •