468,770 Members | 2,219 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,770 developers. It's quick & easy.

Performance improvement ??

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

TIA,

Gary
Nov 15 '05 #1
10 1738
Hi Gary,
C# and VB.NET should have identical performance (they're both compiled
to IL)

But check out this interesting article.

http://builder.com.com/5100-6373-1027686.html

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

TIA,

Gary


Nov 15 '05 #2
No, it won't. What kind of performance issues are you running into?

Willy.

"Gary" <ms****@microsoft.com> wrote in message news:eK**************@TK2MSFTNGP11.phx.gbl...
I would like to know if I use C# instead of Vb.Net for Server components,
will there a performance improvement ?

TIA,

Gary

Nov 15 '05 #3
Benny Mathew <be***@mvps.org> wrote in news:euWzKKOfDHA.3228
@tk2msftngp13.phx.gbl:
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

--
Get LLBLGen Pro, the new O/R mapper for .NET: http://www.llblgen.com
Nov 15 '05 #4
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

"Frans Bouma" <pe**********@xs4all.nl> wrote in message
news:Xn*********************************@207.46.24 8.16...
Benny Mathew <be***@mvps.org> wrote in news:euWzKKOfDHA.3228
@tk2msftngp13.phx.gbl:
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

--
Get LLBLGen Pro, the new O/R mapper for .NET: http://www.llblgen.com

Nov 15 '05 #5
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.

"Gary" <ms****@microsoft.com> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...
I would like to know if I use C# instead of Vb.Net for Server components,
will there a performance improvement ?

TIA,

Gary

Nov 15 '05 #6
Thanks guys, for all this information.
Very informative indeed :)

- Gary -

"Jeff Molby" <JeffMolby@C_mc_st.n_t> wrote in message
news:u0**************@tk2msftngp13.phx.gbl...
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.

"Gary" <ms****@microsoft.com> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...
I would like to know if I use C# instead of Vb.Net for Server components, will there a performance improvement ?

TIA,

Gary


Nov 15 '05 #7
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in
news:uY**************@TK2MSFTNGP11.phx.gbl:
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

--
Get LLBLGen Pro, the new O/R mapper for .NET: http://www.llblgen.com
Nov 15 '05 #8
Frans Bouma <pe**********@xs4all.nl> wrote:
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).

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #9
Frans,
I normally use VB.NET, I am positive about this.

Also Jon confirmed it with a passage from MSDN.

Hope this helps
Jay

"Frans Bouma" <pe**********@xs4all.nl> wrote in message
news:Xn*********************************@207.46.24 8.16...
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in
news:uY**************@TK2MSFTNGP11.phx.gbl:
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

--
Get LLBLGen Pro, the new O/R mapper for .NET: http://www.llblgen.com

Nov 15 '05 #10
Jon Skeet <sk***@pobox.com> wrote in
news:MP************************@news.microsoft.com :
Frans Bouma <pe**********@xs4all.nl> wrote:
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).


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

FB

--
Get LLBLGen Pro, the new O/R mapper for .NET: http://www.llblgen.com
Nov 15 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by sree | last post: by
18 posts views Thread by Alex Vinokur | last post: by
4 posts views Thread by Aaron | last post: by
15 posts views Thread by MuZZy | last post: by
12 posts views Thread by Lloyd Dupont | last post: by
2 posts views Thread by Paul McGuire | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.