Results 1 to 25 of 25

Thread: VB's Speed

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2003
    Posts
    237

    VB's Speed

    someone posted a thread here to compare speed of vb and delphi. so vb is quite slow in loop, and delphi is RAD.

    did microsoft solve this in .net?

  2. #2
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994

    Re: VB's Speed

    Originally posted by elsc
    someone posted a thread here to compare speed of vb and delphi. so vb is quite slow in loop, and delphi is RAD.

    did microsoft solve this in .net?
    If you want to migrate, don't migrate to VB.Net, it'll be slow no matter what, go do C# or something(if it HAS to be a microsoft technology)
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    .NET Applications are quite slow than previous versions of VB6 or even Delphi .

  4. #4
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618
    The reverse side of that arguement is how often is program execution time the main limiting speed factor in modern software?

    If you want to migrate, don't migrate to VB.Net, it'll be slow no matter what, go do C# or something(if it HAS to be a microsoft technology)
    There is little to know difference in the speed of C# versus VB.NET. All dotnet languages get converted to the same underlying code.
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

  5. #5
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    Originally posted by SeanGrebey
    The reverse side of that arguement is how often is program execution time the main limiting speed factor in modern software?
    It really isn't, but it's nice having a versatile language as the one you're really good at, one that allows you to make tasks that need fast execution... I see the problem when doing games, I believe it's really important having a fast engine for this kind of thing, which you need to write in a fast language...
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  6. #6

  7. #7
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Re: VB's Speed

    Originally posted by vbNeo
    If you want to migrate, don't migrate to VB.Net, it'll be slow no matter what, go do C# or something(if it HAS to be a microsoft technology)
    Eh?

    C# and VB.net produce the same native code due to the framework. They are equivalent.

    Otherwise I find VB.net quite a lot faster (once it's loaded) than vb6.
    I don't live here any more.

  8. #8
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    The OSNEWSSTORY link contained a rather poor benchmark of languages by the sounds of the comments left on it. The author even claimed to be no expert at benchmarking.

    He gave C# an unfair advantage by making it allocate a new buffer on every iteration.

    He gave (probably unknowingly) VB.NET an unfair disadvantage by using the VB-6 compatible I/O functions, instead of the framework I/O functions.

    In reality, the difference between the languages is so small, it should even be an issue anymore in an environment that is becoming more distributed, databases over a network connection, web services, these are the bottlenecks.

  9. #9
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    I agree, but it is the only comparison I have seen.

  10. #10
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    Well, if you really want speed, use C or even better, ASM. Heck, code in binary!
    "I remember when we coded in 1's and 0's, and we didn't have any 0's!"

  11. #11
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654
    Well, it depends. VB6 can be awesomely fast if you know what you do. I've been able to make a graphics file loader (including nearly 5000 sprites) to load about as fast as the C equivalent. 2 MB compressed file decompressed to 5.3 MB of graphics data into memory just in 0.1 seconds on a 2200+ Athlon XP. And believe me, it could be faster, I didn't bother to go and try find the most optimized way

    The down thing in this is that you must be very good in understanding binary numbers. And a lot depends on what you're doing. I might give a shot sometime on trying to make a game with a single BitBlt command to see how good VB can do the work.

    Use Byte Arrays or Long Arrays when you can. Dislike Strings when possible. Prevent bad coding, try find the shortest way you can do something, always think if you can skip some code and do it faster... do only what is required. Best tips I can give for now on the optimizing side.

    Anyways... VB is slow only if you use the easy parts of the code. If you go to the hard part and use creatively what little low level commands VB allows you to use, you can do amazingly fast code when it is needed.

    Edit YAY! This is my 1001st post!

    Edit #2 BOO! This is my first post in VB.NET area -_-

  12. #12
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by Merri
    Well, it depends. VB6 can be awesomely fast if you know what you do. I've been able to make a graphics file loader (including nearly 5000 sprites) to load about as fast as the C equivalent. 2 MB compressed file decompressed to 5.3 MB of graphics data into memory just in 0.1 seconds on a 2200+ Athlon XP. And believe me, it could be faster, I didn't bother to go and try find the most optimized way

    The down thing in this is that you must be very good in understanding binary numbers. And a lot depends on what you're doing. I might give a shot sometime on trying to make a game with a single BitBlt command to see how good VB can do the work.

    Use Byte Arrays or Long Arrays when you can. Dislike Strings when possible. Prevent bad coding, try find the shortest way you can do something, always think if you can skip some code and do it faster... do only what is required. Best tips I can give for now on the optimizing side.

    Anyways... VB is slow only if you use the easy parts of the code. If you go to the hard part and use creatively what little low level commands VB allows you to use, you can do amazingly fast code when it is needed.

    Edit YAY! This is my 1001st post!

    Edit #2 BOO! This is my first post in VB.NET area -_-
    I think , you don't know how .NET applications work , do you ? VB.NET is NOT VB .

  13. #13
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654
    It is not specified in the first post if we're talking about VB6 or VB.NET, except that he is pointing out older VB (pre .NET) would be slower than Delphi. I have no experience on Delphi's capabilities, so I can't answer to that, but I can tell VB6 can be very fast. I'm not claiming anything on VB.NET (and I find this posted in the Classic VB area, otherwise this would have gone unnoticed for me).

    So yes, I know VB isn't VB.NET and yes, I probably have a much bigger experience on VB than you have on VB.NET

  14. #14
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by Merri
    So yes, I know VB isn't VB.NET and yes, I probably have a much bigger experience on VB than you have on VB.NET
    And I'm sure I've a much bigger experience on VB.NET than you have on VB . The first post is asking about this glitch if it continued in .NET .

  15. #15
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    Don't argue with Pirate. He knows more than you or me. I'm serious. He does. Maybe the team at Microsoft knows more than him (her?), but I doubt many of us here do.

  16. #16
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654
    Well, to be correct, we neither know how much either us know and salvenius knows less about us than either of us know about ourselves. And it is hard to compare skills due to the different experience span and interests and so on.

    Anyways, I haven't touched .NET and had only the interest to point out it is possible to have very fast code in VB. I probably didn't see the earlier post and I'm too lazy to search for it. I tend to defend VB anytime it is even slightly blamed to be slow. It is slow, but only in the areas where speed doesn't really matter

    We're deep offtopic?


    Edit I wonder if the first sentences came out fine, I managed to confuse myself when I reread them now It's nice not to be a native

  17. #17
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    Yeah, that first sentence is a doozie. But I have no doubt Pirate, Edneiss, Hellwraith and others are way ahead of me, and others like Taxes are mostly ahead of me, in VB.Net, and although haven't been in the "Classic" VB forum for a while, wouldn't be surprized if you were way ahead of me there, giving you at least some leg up here.

  18. #18
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    Originally posted by salvelinus
    Well, if you really want speed, use C or even better, ASM. Heck, code in binary!
    "I remember when we coded in 1's and 0's, and we didn't have any 0's!"
    That's the stuppidest thing I've read all day
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  19. #19
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    Originally posted by vbNeo
    That's the stuppidest thing I've read all day
    It's an old joke.
    Your opinion might have more effect if you knew how to spell. It's a tricky thing, being stupid.

  20. #20
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by salvelinus
    Well, if you really want speed, use C or even better, ASM. Heck, code in binary!
    You're absolutely right .

  21. #21

    Thread Starter
    Addicted Member
    Join Date
    May 2003
    Posts
    237
    so which 1 is better? C# or vb.net?

    i just need it for database development, and looping through large amount of data.

  22. #22
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618
    so which 1 is better? C# or vb.net?
    I hope somebody gets it, so here I go...

    "But why male models?"
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

  23. #23
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    Originally posted by elsc
    so which 1 is better? C# or vb.net?

    i just need it for database development, and looping through large amount of data.
    C++
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  24. #24
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by elsc
    so which 1 is better? C# or vb.net?
    i just need it for database development, and looping through large amount of data.
    Search this forum . It has been discussed many times .

  25. #25
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    The trick to understanding the difference between C# and VB.Net in speed is to understand that any differences that may arise exist become of the particular compiler.

    There has been some speculation there is a (VERY VERY) small performance gain using C#, but in reality, no one has produced any reliable irrefutable proof.

    As I mentioned before, the real bottlenecks to worry about these days is networks and databases, not the power or perceived speed of the language you're programming in.

    To illustrate, I spent four hours testing various ways of creating a datatable in memory, using indexing by literals, then ordinals, exchanging LoadDataRow for manually populating it.

    After four hours of rerunning my tests, no matter what I did, the biggest difference in speed i noticed was 1ms. The average being 15ms, and using different manners of creating the table, I could shave + or - 1ms to the performance. In my mind, that's ridiculously insignificant. The time I spent trying to optimize my code could have been better spent thinking of new application ideas.

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