Some have questioned the future of asm as .NET comes along. I found this article interesting as they talk about using C++ to optimize code.

Here are some highlights:
===============================================
Many programmers think that C++ gets good performance because it generates native code, but even if your code is completely managed you'll still get superior performance. With its flexible programming model, C++ doesn't tie you to procedural programming, object-oriented programming, generative programming, or meta-programming.

Another common misconception is that the same kind of superior performance on the .NET Framework can be attained regardless of the language you use?that the generated Microsoft intermediate language (MSIL) from various compilers is inherently equal. Even in Visual Studio .NET 2003 this was not true, but in Visual Studio 2005, the C++ compiler team went to great lengths to make sure that all of the expertise gained from years of optimizing native code was applied to managed code optimization. C++ gives you the flexibility to do fine tuning such as high-performance marshaling that is not possible with other languages. Moreover, the Visual C++ compiler generates the best optimized MSIL of any of the .NET languages. The result is that the best optimized code in .NET comes from the Visual C++ compiler.

Visual C++ has always offered the most advanced set of optimizations of any compiler. This has not changed in managed code.

A few examples of the types of things that the compiler can not do because of either metadata or verifiability constraints include strength reduction (to convert multiplications into pointer addition), and inlining the access of private members of one class into the method body of another class.
===============================================

So if you wanted your asm code to output msil, you can still outperform C++ on .NET.
Posted on 2004-12-19 09:13:31 by drhowarddrfine