Re:Java faster than C
by tx on Sunday June 03, 2007 @07:18PM
(#26174)
No offense, but did you carefully read what Jay said? C and C++ is essentially same language, extended with OO+templates. And you can implement virtual method call in C as well.
I would even argue that C++ is faster than C because latest compiler optimization techniques and modern approach to templatized designs yield very impressive performance not typical for ligher-level languages.
The biggest issue with C++ (as a language) in my opinion is it's total lack of modules. In the end, everything needs to be included into every cpp file.
Speed is certainly not an issue. The only language that gets a chance of beating C/C++ is probably OCaml since it gives more information about your intentions to an optimizer/code generator.
Re:Java faster than C
by machine on Sunday June 03, 2007 @08:28PM
(#26179)
I agree with tx. With C++ you can often avoid what would be virtual method calls in Java / if statements in C by using templates. This lets you effectively inline every function call. It'd be hard to do this in a clean way in C.
I would even argue that C++ is faster than C because latest compiler optimization techniques and modern approach to templatized designs yield very impressive performance not typical for ligher-level languages.
The biggest issue with C++ (as a language) in my opinion is it's total lack of modules. In the end, everything needs to be included into every cpp file.
Speed is certainly not an issue. The only language that gets a chance of beating C/C++ is probably OCaml since it gives more information about your intentions to an optimizer/code generator.