Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

.net performance

I found this article interesting, , mostly because it describes what i'm currently doing in VB6.

i'm interested in finding out the performance gains of migrating my code to the .net platform.  is .net faster, or just more convenient/powerful?  i'm not so much concerned with those last two, because i'm doing what i need, and it's very convenient to not have to rewrite my programs.  :) 

what have you guys found?  is C# faster than VB6?

Friday, October 25, 2002

I've not done benchmarks, but I, too, have done nearly the same reporting stuff in VB6, using design similar to that described in this article.

Too bad we keep reinventing wheels.  ;-)

Jeremy Dunck
Saturday, October 26, 2002

If my understanding of the .net licencing agreement is correct, you are explicitly forbidden to publish the results of ANY sort of performance comparisons you make. This would include comparisons of .net languages with earlier versions of Microsofts own languages.

Mike Watson
Tuesday, October 29, 2002

oh geez, i had forgotten about that.  hmmm... are you saying i can't even use this information to try to sell my bosses?  ugh.

well, that may be why my search results are rather lean...


Tuesday, October 29, 2002 and c# will have the same performance results because it ends up being the same IL code anyway.

I've found vb6 and winform performance to be pretty much equivalent.

The best thing about .net is the library/framework. In VB6, if you wanted to do any networking, you had to use the winsock control or win32 API.

Well, the winsock control sucked ass for me (this was back in 98) as I tried to use it as a proxy between my browser and the net (to change the http_user_agent). It couldn't keep up.

With .net, it is all one code base and it is pretty optimized.

Thursday, October 31, 2002

Actually, people have documented IL differences between the VB.NET and C# compilers -- though they both compile to MSIL, they take different approaches to optimizing things. The few investigations I've seen of this suggest that the C# compiler is less likely to push unnecessary variables around.

But I suspect it's not a big enough difference to have any practical impact on most applications.

Mike Gunderloy
Thursday, October 31, 2002

I wish Option Strict On disallowed the FunctionName = ReturnValue convention; I don't think I've ever used it in VB.NET. But that's probably the biggest source of 'unnecessary' temporary variables in VB.NET IL.

Dave Rothgery
Monday, November 04, 2002

"I wish Option Strict On disallowed " [whatever]

Have you looked at lint type tools? FxCop* uses reflection and a set of rules to determine what you've done 'wrong'. It will spit out way too much garbage (which can be turned off), but will find a few real places for improvement.

* Look here: . I really don't like the gotdotnet website, it demonstrates a number of major 'web usability' problems of the .net framework.

Monday, November 04, 2002

*  Recent Topics

*  Fog Creek Home