473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

All .NET Languages are no longer equal.

Imagine that. Up to now the party line was that the .NET languages
produced pretty much similar MSIL. With Visual Studio 2005, C++ is now
the most optimized. Ref. MSDN Magazine Jan 2005.

C++ optimizations now apply to managed code.
1) JIT and Compiler Optimization interaction
2) Common subexpression elimination and algebraic simplification.
3) Whole program optimization
4) 64 NGEN Optimization
5) Double thunk elimination
6) Interop optimization
7) Class instances with stack semantics

Now I just need to get my hands on a copy of Visual Studio 2005 <g>

Regards,
Jeff

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
10 1059
Jeff Louie <je********@yahoo.com> wrote:
Imagine that. Up to now the party line was that the .NET languages
produced pretty much similar MSIL. With Visual Studio 2005, C++ is now
the most optimized. Ref. MSDN Magazine Jan 2005.


No, that's been the case before now as well. The C++ compiler has
always done much more optimisation than the C# and VB.NET compilers.
Just how useful that is depends on the exact code - the JIT is where
most of the really important optimisation is likely to occur, but
occasionally the C++ compiler can do much better than the C# compiler.

Usually when people talk about producing similar IL, they're talking
about C# vs VB.NET.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2

"Jeff Louie" <je********@yahoo.com> wrote in message
news:OQ**************@TK2MSFTNGP11.phx.gbl...
Imagine that. Up to now the party line was that the .NET languages
produced pretty much similar MSIL. With Visual Studio 2005, C++ is now
the most optimized. Ref. MSDN Magazine Jan 2005.

C++ optimizations now apply to managed code.
1) JIT and Compiler Optimization interaction
2) Common subexpression elimination and algebraic simplification.
3) Whole program optimization
4) 64 NGEN Optimization
5) Double thunk elimination
6) Interop optimization
7) Class instances with stack semantics


Too bad that all requires C++. Wouldn't it be nice to have a nice optimizer
and a nice language at the same time?
Nov 16 '05 #3
Daniel... There is no question that C++ can be a difficult language, but
programmers familiar with the STL in C++ can now write managed code
using the STL.

Regards,
Jeff
Too bad that all requires C++. Wouldn't it be nice to have a nice

optimizer and a nice language at the same time?<

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #4

"Jeff Louie" <je********@yahoo.com> wrote in message
news:ON**************@TK2MSFTNGP10.phx.gbl...
Daniel... There is no question that C++ can be a difficult language, but
programmers familiar with the STL in C++ can now write managed code
using the STL.


I'm aware of that, and that doesn't sway me. It actually concerns me a bit.

I am curious how STL code will come out in the end. Will it be provide code
that is attractive to use in other languages, or is it basically a cute way
to turn managed C++ code into a mess that is horrible in other languages? I
can only hope they got it right, but due to the MI involved, I somehow doubt
it. If its the later, your topic fits much better as the run of the mill
managed C++ will probably be as alien as unmanaged C++ is, or at the least
direct Delphi compilations for the framework.

Unfortunatly, I don't think I have C++ installed, so I can't say for sure.
Nov 16 '05 #5
Dan...

As I recollect, Plauger was doing the STL port to .NET, but I cannot
find the column he wrote. I suspect that VS2005 will simply attract more
C++ coders to .NET, which is a good thing.

Regards,
Jeff
I can only hope they got it right<


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #6

"Jeff Louie" <je********@yahoo.com> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
Dan...

As I recollect, Plauger was doing the STL port to .NET, but I cannot
find the column he wrote. I suspect that VS2005 will simply attract more
C++ coders to .NET, which is a good thing.


More support is nice, yes. However, the concern still remains...is more
people writing what is effectivly alien code a good thing? I suppose
strictly from a numbers standpoint it is, but I am quite concerned that
there will be
C# & VB.NET libraries and C++ .NET libraires, introducing a nasty schism. I
dont want to have to learn the STL and its quirks to work with C++
libraries.

However, hopefully, the port will get things right and won't cause any undue
stress on anyones behalf.
Nov 16 '05 #7
Hi,

It may also be due that the C++ compiler should be more mature than those
of C# and VB.NET it has been around longer and had lots of optimizations for
a long time.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Jeff Louie <je********@yahoo.com> wrote:
Imagine that. Up to now the party line was that the .NET languages
produced pretty much similar MSIL. With Visual Studio 2005, C++ is now
the most optimized. Ref. MSDN Magazine Jan 2005.


No, that's been the case before now as well. The C++ compiler has
always done much more optimisation than the C# and VB.NET compilers.
Just how useful that is depends on the exact code - the JIT is where
most of the really important optimisation is likely to occur, but
occasionally the C++ compiler can do much better than the C# compiler.

Usually when people talk about producing similar IL, they're talking
about C# vs VB.NET.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 16 '05 #8


"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi,

It may also be due that the C++ compiler should be more mature than those
of C# and VB.NET it has been around longer and had lots of optimizations
for a long time.


Some notes:
- the C++ front-end compiler (MSIL generator) has NOT been arround longer
than the other .NET compilers.
- the C++/CLI marketing team is well paid to promote 'their' product,
however, yet they fail to publish any benchmark ;-).

Willy.
Nov 16 '05 #9

"Jeff Louie" <je********@yahoo.com> wrote in message
news:OQ**************@TK2MSFTNGP11.phx.gbl...
Imagine that. Up to now the party line was that the .NET languages
produced pretty much similar MSIL. With Visual Studio 2005, C++ is now
the most optimized. Ref. MSDN Magazine Jan 2005.
Ok, I finally got around to reading this article, so I have some comments:
C++ optimizations now apply to managed code.
1) JIT and Compiler Optimization interaction
2) Common subexpression elimination and algebraic simplification.
It would be nice if C# had these.
3) Whole program optimization
This, actually, is basically catchup with C#. The compilation model for C#
forces the compiler to analyze every file before generating any code. So the
few optimizations the C# compiler does that can occur over
multiple files were already performed(constants mainly).
4) 64 NGEN Optimization From what the article said, the 64bit NGEN is considerably more complex than
the 64bit JIT...I wonder how well it does at generating code for non-C++
assemblies. It is slightly disenheartning that the JIT was designed to favor
C++, but with any luck it will boost all MSIL considerably.
5) Double thunk elimination
6) Interop optimization Less important, IMHO, but its nice to have a langauge capable of performing
these calls with better performance when you have to deal with alot of
interop code.
7) Class instances with stack semantics


This would be a nice addition to C# as well, I just don't think its going to
happen anytime soon.

Not sure I would call it an optimization though, from what I've read it is
sorta like an automatic using statement.
Nov 16 '05 #10
The Express Editions of VS.Net 2005 are available for free download at
microsoft.com.

with regards,
J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jack Smith | last post by:
I posted this question earlier, but I got no responses. Can anyone help me out here...any hints or even how to start? Thanks in advance. Let doubleswap(x) be the string formed by replacing each...
30
by: Christian Seberino | last post by:
How does Ruby compare to Python?? How good is DESIGN of Ruby compared to Python? Python's design is godly. I'm wondering if Ruby's is godly too. I've heard it has solid OOP design but then...
4
by: Minh T. Nguyen | last post by:
There are always lengthy discussions about which .NET language is better: C# or VB.NET. However, I am really interested in finding actual figures indicating which .NET language is primarily used in...
16
by: smk23 | last post by:
What is a good source of unbiased info about the relative value of programming in C#.Net vs VB.Net for a web-based application? Everyone seems to like what is most familiar to them, and I am...
25
by: bearophileHUGS | last post by:
This post comes from a boring morning, if you are busy ignore this. This post is only for relaxed people. I've found this page, "Syntax Across Languages", it contains many errors and omissions,...
14
by: Rich | last post by:
Hi, (this is a probably a bit OT here, but comp.lang seems rather desolated, so I'm not sure I would get an answer there. And right now I'm in the middle of learning Python anyway so...) ...
40
by: apprentice | last post by:
Hello, I'm writing an class library that I imagine people from different countries might be interested in using, so I'm considering what needs to be provided to support foreign languages,...
62
by: Xah Lee | last post by:
Criticism versus Constructive Criticism Xah Lee, 2003-01 A lot intelligent people are rather confused about criticism, especially in our “free-speech” free-for-all internet age. When they...
5
by: lorlarz | last post by:
Sparkline Graphs no longer work in Firefox. I am pissed. Does anyone care? Here is what used to run in FireFox 1.5 and 2, but no longer works in Firefox 3 (not on PC or Linux anyway). Anyone...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.