CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: VB vs VC++

  1. #1
    Join Date
    Jun 2004
    Location
    England
    Posts
    90

    VB vs VC++

    Hi all,

    C++ is more efficient and faster than VB, right?

    well as I was developing an app, I learned that VB can do things a lot faster than VC++, like Ms word Automation!!!

    I wrote an app that populate formfields, many of them, it took quite long in VC++, and all the automation overhead. I then played with VB (I am not a VB programmer) only to find out that it was much faster. someone please help.

    thanks
    The most knowledgeable people are those who know that they know nothing.

  2. #2
    Join Date
    Feb 2002
    Posts
    5,757
    Are you comparing performance or development time?

    Kuphryn

  3. #3
    Join Date
    Jun 2004
    Location
    England
    Posts
    90
    I am comparing performance

    The performance of the VB version i far better.

    I don't understand it at all
    The most knowledgeable people are those who know that they know nothing.

  4. #4
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537
    well as I was developing an app, I learned that VB can do things a lot faster than VC++, like Ms word Automation!!!
    as I recall and I'm probably talking out my rear since I have not confirmed this via disassembly...but VB is optimized for the above.

  5. #5
    Join Date
    Jun 2004
    Location
    England
    Posts
    90
    if that is the case, then it makes sense

    Its the only logical explanation

    Cheers
    The most knowledgeable people are those who know that they know nothing.

  6. #6
    Join Date
    Aug 2002
    Location
    Madrid
    Posts
    4,588
    Quote Originally Posted by Mick
    as I recall and I'm probably talking out my rear since I have not confirmed this via disassembly...but VB is optimized for the above.
    Yes, but that doesn't mean that it's necessarily slower in C++. You can actually get better speed in C++ for Word automation than in VB, provided that you optimise your code correctly. For example, you can use vtbl calls instead of IDispatch if you know which Office version you're using. In case you don't know, you can cache the dispids of the required functions etc.

    The thing is that it's so much easier to do automation in VB and there is no scope for making inefficient use of calling (ok some, but not much), but in C++ you can greatly mess up things if you're using the wrong approach.
    Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
    Supports C++ and VB out of the box, but can be configured for other languages.

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

Featured