Re: Java outperforms C++?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello, benben!
You wrote in conference microsoft.public.vc.language on Tue, 12 Apr 2005
22:05:41 +1000:

b> on page 601 of Code Complete 2nd Edition by Steve McConnell. It seems,
b> as shown in the table, that Java outperforms C++ in every criteria, if
b> not merely matches the latter.

I am really surprised that there still are people eager to argue about C++
vs Java. If programmers spent all the time they spent on this arguing on
smth more useful, the world could be better now :)

Anyway, there is one and only one place where Java can be faster than C++
compilers - it's memory management - GC:
1. GC allocations are usually faster than tree-like heap allocatins.
2. During peak CPU usage time is not spent on deallocations - response is
_theoretically_ faster.

GC can be used in C++ too but it's not used, at least by typical C++
programers ;)

Modern optimizing compilers, profile-guided optimization, modern AI-enabled
CPUs with branch prediction provide C++ code with all benefits of
JIT-compiled code.

Best regards, Vyacheslav Lanovets


.



Relevant Pages

  • Re: Java outperforms C++?
    ... If programmers spent all the time they spent on this arguing on ... GC allocations are usually faster than tree-like heap allocatins. ... During peak CPU usage time is not spent on deallocations - response is ... > Modern optimizing compilers, profile-guided optimization, modern ...
    (microsoft.public.vc.language)
  • Re: Looking for some design inspiration
    ... We at GemStone Systems have spent a great deal of time and effort to ... a disk file. ... usually to help avoid using too much heap in the virtual machine... ... but only a portion of the table needs to be in the Java heap ...
    (comp.databases.theory)
  • Re: Thinking in Java book Source Code
    ... I'm eager to read the book Thinking in Java, by Bruce Eckler. ... i've spent quite some hours trying to get the code from chapter 3 to run. ...
    (comp.lang.java)
  • Re: macros
    ... write what you just accused me of misattributing? ... she spent a lot of time complaining about Java? ...
    (comp.lang.lisp)
  • Re: VBs CreateObject for C#
    ... I spent several hours trying to figure out how to get ... C++ to Java ... When I was trying to find something similar to CreateObject(), ... I've been doing some reading on how to get information, ...
    (microsoft.public.dotnet.languages.csharp)