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?
Printable View
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)Quote:
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?
.NET Applications are quite slow than previous versions of VB6 or even Delphi .
The reverse side of that arguement is how often is program execution time the main limiting speed factor in modern software?
There is little to know difference in the speed of C# versus VB.NET. All dotnet languages get converted to the same underlying code.Quote:
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)
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...Quote:
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?
Eh?:ehh:Quote:
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)
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.
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.
I agree, but it is the only comparison I have seen.
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!"
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 :D
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 .Quote:
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 :D
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 -_-
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 ;)
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 .Quote:
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 ;)
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. :)
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 :D It's nice not to be a native
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.
That's the stuppidest thing I've read all dayQuote:
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!"
It's an old joke.Quote:
Originally posted by vbNeo
That's the stuppidest thing I've read all day
Your opinion might have more effect if you knew how to spell. It's a tricky thing, being stupid.
You're absolutely right .Quote:
Originally posted by salvelinus
Well, if you really want speed, use C or even better, ASM. Heck, code in binary!
so which 1 is better? C# or vb.net?
i just need it for database development, and looping through large amount of data.
I hope somebody gets it, so here I go...Quote:
so which 1 is better? C# or vb.net?
"But why male models?"
C++ :pQuote:
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 .Quote:
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.
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.