Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / DBP vs DBC - Lets settle this

Author
Message
TheComet
11
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 9th Sep 2012 04:59 Edited at: 9th Sep 2012 06:15
There have been some claims from DBC users recently that there is no big speed difference between DBP and DBC. I'm going to put this to the test and make a video showing the two go face to face. The video should settle these hypotheses once and for all.

What I need from you is a list of things that I should test. Here it is currently:

-Variable read/write test
-Array read/write test
-Objects on screen and frame rate
-Sprites on screen and frame rate
-read/write files test
-read/write memblock test

I have heard that DBC is apparently faster in some things than DBP, however, I haven't found anything that supports this claim.

TheComet

"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown
Dar13
11
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 9th Sep 2012 05:57
Testing filesystem read/write would be interesting, they both *should* be pretty even.

Another good one would be image manipulation speeds(memblock read/write vs DBC equivalent).

TheComet
11
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 9th Sep 2012 06:15
Added those to the list.

TheComet

"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown
Fluffy Rabbit
User Banned
Posted: 9th Sep 2012 09:37
DBC should be a little slower overall according to TGC, because DBC has its own virtual machine while DBP code is compiled to "bytecode" (so either C or ASM). Of course, that's what you're here to test. I'll just wait and see...
Kevin Picone
17
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 9th Sep 2012 11:00
DB classic compiles to byte code and run on a virtual machine, while DBP is compiled to machine code.

Might as well compare apples with oranges

Fluffy Rabbit
User Banned
Posted: 9th Sep 2012 11:37
@Kevin-

Yeah, "machine code". I wonder if this one aspect has a significant impact on the speed of DarkBASIC programs.
Kevin Picone
17
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 9th Sep 2012 14:52 Edited at: 10th Sep 2012 02:00
There's probably about 10 times (rough guess) the number crunching between them in brute force comparisons. So it'd be easy to conclude that all DBpro programs would run at least ten times faster then ? The truth is probably not. Since the comparison such conclusions are based upon, are generally flawed.

The classic comparison people roll out is the loop test. Something like this.



Let's say (completely made up performance figures follow) DB runs the loop in 10 milliseconds and DBP runs perfectly in 1 millisecond. That seems impressive, and would be a huge benefit those that need absolute brute force. But what are we actually timing here ? The loop overhead, one addition with assignment. That's not very representative of the balance real programs have. Real world programs are calling built in/user defined functions, jumping all over the place constantly, not sitting in tight loops. The cost of which can easily warp such results.

Having said that, DBpro should be much quicker across the board than DB classic, but there's bound to areas where the performance difference isn't overly significant either. So things tend to balance out.

Fluffy Rabbit
User Banned
Posted: 10th Sep 2012 04:15
@Kevin-

Yep. You sure nailed it. It would be cool however to see the differences between a game running in DBC and it being ported to DBP.
29 games
13
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 11th Sep 2012 00:58
Quote: "It would be cool however to see the differences between a game running in DBC and it being ported to DBP."


I supose I did this with my current project when I swapped to DBPro fairly on in the development as I just couldn't get it to run quick enough on my old computer. Changing to DBPro was a quick fix for the speed issue.

Personally, I don't care which is faster or whether a game has been made on DBC, DBPro or something else. If it's a good game it's a good game. I play G Speed every so often and there a wolfenstine-esque game on the WIP board at the moment that looks promising. Would these games be better in DBPro or C++? Maybe, maybe not. If the developer isn't comfortable with the tools they're using then chances are the game will suffer for it.
Fluffy Rabbit
User Banned
Posted: 11th Sep 2012 04:06
@29 games-

I don't really think that's fair. One of your games ran faster in DBP than DBC, which may generally be the case, but all games are different and TheComet still has yet to do his tests.

However, I do think it's cool how one can just take code from one and compile it on the other. Maybe in the future there will be a DarkBASIC compiler that can target other platforms...
TheComet
11
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 13th Sep 2012 12:44
I haven't had a lot of time this week, but I should be able to get the video up this coming Sunday.

@ Kevin - I am aware of the dangers of comparing the languages like that, so I have made a small demo game which runs in both languages.

TheComet

"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown
Fluffy Rabbit
User Banned
Posted: 13th Sep 2012 14:36
@TheComet- I'm looking forward to it.

Quote: "I have made a small demo game which runs in both languages."


Yep. Sounds like
Quote: "It would be cool however to see the differences between a game running in DBC and it being ported to DBP."


I predict it will overall be a little faster in DBP.
Phaelax
DBPro Master
16
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Nov 2012 08:13
Anyone who thinks DBC is faster than DBP obviously coded something wrong in DBP.

"You're not going crazy. You're going sane in a crazy world!" ~Tick
Libervurto
13
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 16th Feb 2013 06:25
DBC is always going to be slower because it's interpreted not compiled. Great for chucking some code in and testing stuff but large programs suffer.

Fluffy Rabbit
User Banned
Posted: 16th Feb 2013 13:08
Hey, don't give up. Sure, the logical operations of DBC may be slower, but the rendering algorithms and other high-level functions may be faster. Every program is different. Why are you giving up on the space game? The least you can do is integrate the latest sound generation function so that people have a single codebase to draw from. I'm sure that in the future, there will be people wanting to work on your DBC adaptation.
Libervurto
13
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 16th Feb 2013 23:00
I've continued to work on my string replace function, to convert arrays to more convenient classes and such, so I will continue with that and hopefully make a program that can convert any code between DBC/DBP. That would be pretty neat!

There are many reasons to finally move to DBP, one being the size of the two communities, I think there are only four of us who post regularly on here any more. I'll still be checking these boards and helping where I can but I wont be making any more DBC projects.

Fluffy Rabbit
User Banned
Posted: 17th Feb 2013 00:18
OBese, we owe so much to DBC. If it weren't for DBC, my life would be going in a different direction right now. I am programming my own computer games and selling them on the internet. Several of my projects are using DBC, and they aren't even finished yet. You can't just say that DBP is better. It's a half-assed C++-based compiler that requires some special version of DirectX 9. It doesn't improve on DBC's syntax either. Its only merit is the extra functionality it adds, but there is other software out there that is getting better and better and has those features and more. It doesn't make game programming any easier, and there's very little "professional" about it. DBC has more professional games. Now, you want to talk about easy? DBP is the foundation beneath FPS Creator. Fair enough. DBC is the foundation beneath T3DGM, the easiest game development program ever! The basic concepts behind DarkBASIC favor the original classic version. It's quick to get started in and mixes nostalgic charm with new innovative features. For instance, I added bloom effects to its capabilities with Space Sim 3D quite recently. You want to be next-gen or cutting-edge? Use software rendering and explore features that will never make it to the dying system of polygons and graphics cards. You want a free BASIC language? Try FreeBASIC or QB64. Both of those are cross-platform. DarkBASIC Pro isn't cross-platform. The original DarkBASIC supports one platform: Win32. DBP supports less Win32 OSes than DBC does, meaning it supports less than 1 platform! It's half-platform!
Libervurto
13
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 17th Feb 2013 01:08
I like the look of freeBasic so I've downloaded it, thanks. I use linux primarily so DB's lack of portability is a bit of a pain; I think it's quite odd for a programming language to be "half-platform", as you put it, because while linux usership among the general population is only around 10%, among programmers I'd reckon the proportion is more like 30%, it's certainly enough to make cross-compatibility worthwhile.

Fluffy Rabbit
User Banned
Posted: 17th Feb 2013 02:35
I'm not talking about that. Linux is an OS like any other. By "half-platform", I mean that DBP only supports half of a platform (Windows). The other half won't run it!

Login to post a reply

Server time is: 2019-09-15 14:40:06
Your offset time is: 2019-09-15 14:40:06