Java vs C++

Hey people.
I have a question.
which is faster,c++ or java?why?
thanks

Comments

  • C++. Java is compiled to bytecode and then interpreted, whilst C++ is compiled directly to machine code.
  • C++ also lacks garbage collection, which makes it faster as well.
  • And could you two explain a little about bytecode and garbage collection?
    thanks again
  • C++ is obviously faster than Java. But unless you're building a complex computer program, speed (java vs c++) is negligible since current PCs are fast. I mean really fast.. :-)
  • Java is perfect for desktop/web applications, where there is no performance demand. Programs with higher performance demands are almost always written in C/C++, for example are the vast majority of all computer games written in C/C++.

    ---

    Regarding speed, Intel/AMD CPUs are really really fast, while PCs are very, very slow :-) If I continously feed data to my brand new, super flashy gigahertz dual core yadayada PC, from a tiny slugglish 4MHz 8-bit microcontroller from the eighties, the PC will choke and crash. The reason for this is known as Microsoft Windows.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories