Performance improvement ??

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

I would like to know if I use C# instead of Vb.Net for Server components,
will there a performance improvement ?

TIA,

Gary
 
No, it won't. What kind of performance issues are you running into?

Willy.
 
Hi Gary,
C# and VB.NET should have identical performance (they're both compiled
to IL)

However, VB.NET has virtual methods by default afaik, C# does not.
Virtual methods are little bit slower.

FB
 
Frans,
Huh?

VB.NET methods are virtual only if one uses the Overridable or MustOverride
keywords.

Overridable & MustOverride are not the default, hence the methods are not
virtual by default!

Hope this helps
Jay
 
I am a long time VB developer so I'm not one to bash it unnecessarily.
However, I have had the fairly unique experience of decompiling an entire
VB.Net app into C#. VB uses a number of techniques to accomplish various
tasks that i'm sure C# handles natively. I would have a hard time believing
that it doesn't lose some efficiency. Probably only on the order of a couple
percent though.
 
Frans,
Huh?

VB.NET methods are virtual only if one uses the Overridable or
MustOverride keywords.

Overridable & MustOverride are not the default, hence the methods are
not virtual by default!

Are you sure about this? Afaik, VB.NET makes methods virtual by
default, but my knowledge about this may be lacking, I'm not a native VB.NET
developer :) I am aware of the Overridable keyword, and am not sure where
I've read that vb.net methods are virtual. So I can be wrong, that's why I
said 'afaik' :)

FB
 
Frans Bouma said:
Are you sure about this? Afaik, VB.NET makes methods virtual by
default, but my knowledge about this may be lacking, I'm not a native VB.NET
developer :) I am aware of the Overridable keyword, and am not sure where
I've read that vb.net methods are virtual. So I can be wrong, that's why I
said 'afaik' :)

Not that I'm a VB.NET developer either, but the MSDN says:

<quote>
Properties and methods are NotOverridable by default.
</quote>

(where NotOverridable means the obvious thing).
 
Frans,
I normally use VB.NET, I am positive about this.

Also Jon confirmed it with a passage from MSDN.

Hope this helps
Jay
 
Not that I'm a VB.NET developer either, but the MSDN says:

<quote>
Properties and methods are NotOverridable by default.
</quote>

(where NotOverridable means the obvious thing).

That's clear enough I think:) I was wrong :)

FB
 
Back
Top