language performance question...

P

Paul M

Can somebody please give me some coding examples in how C# written
applications perform better than VB.NEt applications?
I've read that .NET is written primarily for C# language and performance is
meant to be better for it.

thanks,
P.
 
M

Mark Fitzpatrick

I don't think that's truly the case. Because all the .Net languages compile
down to IL, there isactually very little performance difference. The tests
I've seen only show baout a 1 to 2% difference between various languages. C#
was just the new boy written for .Net and may be a little faster in some
things since it is not a re-write of an existing language. Basically though,
if a language's ability to compile down to IL is better than another, it
will be faster.Third-party .Net enabled languages may be right on par with
the default ones, or perhaps a tad slower if their compilers don't compile
to IL as efficiently. I remember reading that large parts of ASP.Net, if not
all parts, were actually written in C#, but that doesn't mean that C# code
runs better for ASP.Net than VB.Net and my performance tests haven't shown
that.


Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
D

David Jessee

The performance difference it relatively small. However, all .NET languages
are not equal. There have been projects that I've HAD to write in C# as
opposed to VB.NET because there were sertian things that I could not do with
VB.NET (e.g. serializing classes that had events)
 
M

Marek

Hi,

The differences are really small. Look at the following example in C#:

someValue = isConditionMet ? firstValue : anotherValue;

This generates a little bit more effective IL code than

If isConditionMet Then
someValue = firstValue
Else
someValue = anotherValue
EndIf

Marek
 
R

Rick Spiewak

An article from 2001 based on the beta? Why would anyone want to see that at
this point!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top