Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Making a Decision
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Struan
Squire

21 Posts

Posted - Jul 12 2005 :  01:42:15 AM  Show Profile  Visit Struan's Homepage  Reply with Quote
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

Go to Top of Page

Vankwysha
Squire

Australia
43 Posts

Posted - Jul 12 2005 :  7:22:17 PM  Show Profile  Click to see Vankwysha's MSN Messenger address  Reply with Quote
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.
Go to Top of Page

Struan
Squire

21 Posts

Posted - Jul 12 2005 :  7:55:14 PM  Show Profile  Visit Struan's Homepage  Reply with Quote
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.
Go to Top of Page

Vankwysha
Squire

Australia
43 Posts

Posted - Jul 12 2005 :  8:27:24 PM  Show Profile  Click to see Vankwysha's MSN Messenger address  Reply with Quote
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.
Go to Top of Page

Almar
Moderator

Netherlands
192 Posts

Posted - Jul 13 2005 :  04:40:49 AM  Show Profile  Visit Almar's Homepage  Send Almar an ICQ Message  Reply with Quote
Could you post your VB6 code?:)

Go to Top of Page

Vankwysha
Squire

Australia
43 Posts

Posted - Jul 13 2005 :  05:09:54 AM  Show Profile  Click to see Vankwysha's MSN Messenger address  Reply with Quote
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 :).

Go to Top of Page

timbo152k
Squire

Canada
25 Posts

Posted - Jul 13 2005 :  11:41:26 PM  Show Profile  Visit timbo152k's Homepage  Send timbo152k an AOL message  Click to see timbo152k's MSN Messenger address  Send timbo152k a Yahoo! Message  Reply with Quote
"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.
Go to Top of Page

Struan
Squire

21 Posts

Posted - Jul 14 2005 :  12:24:30 AM  Show Profile  Visit Struan's Homepage  Reply with Quote
Yeah, VB5 was ever so slightly faster than VB6 :)
Go to Top of Page

Eric Coleman
Gladiator

USA
811 Posts

Posted - Jul 17 2005 :  8:28:30 PM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
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.
Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - Jul 18 2005 :  07:17:19 AM  Show Profile  Reply with Quote
I kinda like Python... it's good for a script language :)

Whatever. Who knows...
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.11 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.