It's impossible to construct meaningful and relevant test cases. You can construct some meaningful test cases, but then they are too small to be relevant (who cares which language is faster at closing a text file?). Or you can make them relevant, but then they are too context-specific to be meaningful (who is going to write a GC layer for C++ so we can test performance?)
The question is not whether the C++ program will have to execute fewer x86 instructions to get something done: it will. So there you go. C will exec even fewer still, and assembler the fewest of all. The addition of the managed features of .Net languages is an _explicit_ tradeoff of instruction overhead against robustness. Whether it's worth it is not a close call; not even remotely close. In ten years when you write C++ younger devs will think you're adding one to a variable, or you'll be like the guy who posted the fortran question yesterday.
Comparing them specifically as to performance is pretty silly, to be honest. When C++ started becoming relevant I was programming on an 80286 with a meg of ram. Windows XP couldn't exist on that hardware, and C#/.Net couldn't exist on it either. If you want to pick one specific task they both can do, then I bet DOS 6.0 will be way faster than XP on my dual-core AMD machine with 2.2 Ghz clocks and 2 gigs.
The question is not whether the C++ program will have to execute fewer x86 instructions to get something done: it will. So there you go. C will exec even fewer still, and assembler the fewest of all. The addition of the managed features of .Net languages is an _explicit_ tradeoff of instruction overhead against robustness. Whether it's worth it is not a close call; not even remotely close. In ten years when you write C++ younger devs will think you're adding one to a variable, or you'll be like the guy who posted the fortran question yesterday.
Comparing them specifically as to performance is pretty silly, to be honest. When C++ started becoming relevant I was programming on an 80286 with a meg of ram. Windows XP couldn't exist on that hardware, and C#/.Net couldn't exist on it either. If you want to pick one specific task they both can do, then I bet DOS 6.0 will be way faster than XP on my dual-core AMD machine with 2.2 Ghz clocks and 2 gigs.