Struan
Squire
21 Posts |
Posted - Jul 12 2005 : 01:42:15 AM
|
It seems I was too quick to jump to my 70 times faster conclusion. I decompiled the VB.NET to see what optimizations it made and I found out it turns For Loops into Do Loops automatically (I think I knew that before and I forgot). So I rewrote the code for VB6 into the same Do Loops that VB.NET uses in its MSIL state and managed to get the VB6 down to the much more reasonable 626936 ticks although it is still about 10 times slower than VB.NET
|
|
|
Vankwysha
Squire
Australia
43 Posts |
Posted - Jul 12 2005 : 7:22:17 PM
|
What gets me is why would people even assume that VB.NET could be slower? Why would anyone produce a new programming language that was slower than its predecessor? I think that Struan's benchmarks show that VB.NET is faster for most practical gaming purposes. Struan, if at all possible, I think a string benchmark would also be useful. |
|
|
Struan
Squire
21 Posts |
Posted - Jul 12 2005 : 7:55:14 PM
|
What kind of string benchmark? Searching? Sorting? Concatenating? There is a lot you can do with strings. I can't think of a practical situation where strings would be the bottleneck in your game anyway, but I would be happy to do a benchmark if you came up with something. I won't have much time to write it until next week maybe not until the week after that. |
|
|
Vankwysha
Squire
Australia
43 Posts |
Posted - Jul 12 2005 : 8:27:24 PM
|
I'm not saying that strings are going to be the bottleneck, far from it, I just think it's another area that should be tested to see the difference in speed between 6 and .NET. The only real area where I've had trouble with strings up until this point in my game is displaying them, which I find reduces my FPS by heaps. |
|
|
Almar
Moderator
Netherlands
192 Posts |
Posted - Jul 13 2005 : 04:40:49 AM
|
Could you post your VB6 code?:)
|
|
|
Vankwysha
Squire
Australia
43 Posts |
Posted - Jul 13 2005 : 05:09:54 AM
|
I don't have any VB6 code, I didn't use DirectX when I was using VB6 and I don't have VB6 anymore, I was just saying that displaying text is something that I was having trouble with. I've seen an old post by Knight Chat X which has cleared up most of my problems :).
|
|
|
timbo152k
Squire
Canada
25 Posts |
Posted - Jul 13 2005 : 11:41:26 PM
|
"What gets me is why would people even assume that VB.NET could be slower? Why would anyone produce a new programming language that was slower than its predecessor?"
It does happen.. Sometimes speed/performance is sacraficed for an easier, less time-consuming (cheaper, for the boss) programming experience.. Abstraction can be good, but it can be a bottleneck to performance if implemented poorly. |
|
|
Struan
Squire
21 Posts |
Posted - Jul 14 2005 : 12:24:30 AM
|
Yeah, VB5 was ever so slightly faster than VB6 :) |
|
|
Eric Coleman
Gladiator
USA
811 Posts |
Posted - Jul 17 2005 : 8:28:30 PM
|
As history has shown us, C is slower than Assembly C++ is slower than C VB is slower than C++
Then why would anyone assume that VB.NET is automatically faster than it's predecessor? And a loop multiplying a number is an oversimplified test that means absolutly nothing.
A real game is more than just a single loop.
And if you're so proficient in C++ or C#, then why convert the SDK examples to VB.NET? Just use C# since you already know the language and save yourself some time.
And as for a VB6 versus VB.NET discussion, it is really like comparing apples to oranges. As Straun pointed out earlier in this thread, any similarties between the two are simply for backwards compatibilty and shouldn't be used at all. While we're on the subject, you might as well compare VB to C++, JAVA, Python, Perl, etc. If speed is so important, then I'm sure at least one of those languages will be better than VB6.
|
|
|
VBBR
Moderator
Brazil
617 Posts |
Posted - Jul 18 2005 : 07:17:19 AM
|
I kinda like Python... it's good for a script language :) |
Whatever. Who knows... |
|
|