Results 1 to 7 of 7

Thread: Is VB.NET slower or less efficient compared to C#

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Location
    Chennai
    Posts
    5

    Question Is VB.NET slower or less efficient compared to C#

    Somebody let me know if VB.NET is less efficient or slower than C#. I have heard comments that VB.NET is same as VB.

    I also heard that a component compiled in VB.NET is several times bigger than the same written and compiled on c#.

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    I don't think this is true...
    the language compiles to the same thing.. only the syntax is different...

    But you can always try for yourself of course... just write a small function in both languages, compile it and see the difference!
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    I decided to test that theory.. Wrote a cs app and a vb app that did the exact same thing..

    They both compiles to the exact same size and when checking the il code, they were exactl identical except for where the vb exe had an instance set to the VB compiler services to define the entry point(The sub main)

    but other than that, identical..No whether that instance setting to that compiler services thing will affect speed, I dsont know as with the small size of the test app, you cant see any speed differences..perhaps in a bigger project, but I dont think it will really matter all that much..
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  4. #4
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  5. #5
    Addicted Member wolfofthenorth's Avatar
    Join Date
    Jan 2001
    Location
    Tatooine
    Posts
    169
    In C# there is an option to mark a block of code as Unsafe. Within that block they can access pointers; which can really speed up some types of processing. I don't think VB has this option.
    That which does not kill us, only makes us stronger.

  6. #6

    Thread Starter
    New Member
    Join Date
    May 2002
    Location
    Chennai
    Posts
    5

    Smile

    Hi all,

    I am really indebted to you all for the useful information you have provided and for the time and effort you spent on this.

    The benchmark info by MrPolite and the threads therein were very useful.

    My special thanks to Cander.

    With warm regards,

    kalyan

  7. #7
    Thelonius
    Guest
    A lot depends on what you really need C# for. You won't find many established applications written in C# simply because it hasn't been around. Most companies don't have the time or resources to rewrite a VB app in C# for any perceived improvements. The only exception I can see is if a company had a production ASP site and wanted to upgrade to .NET. They have no choice but to re-write in which case they could use VBdN or C#. Ultimately, I don't think it will really matter. With the current processor clock speed and cheap memory any performance increase from either language won't be noticeable if it exists at all.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width