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 Professional Discussion / I thought DB Pro was supposed to be "faster" then DB Classic...

Author
Message
Zaxtor99
14
Years of Service
User Offline
Joined: 27th Jul 2011
Location: Boise, Idaho, USA
Posted: 8th Aug 2012 06:24 Edited at: 8th Aug 2012 06:35
Okay, I understood that a program written in DB Pro was supposed to be complied to run in assembly language so that it runs much faster then one written in DB Classic.

I'm sure I am confused or or missing something.. but I have taken my simple snake game written and ran it both on DB Classic and DB Pro since every command in my program is compatible with both.

The program runs the EXACT same speed, same FPS, and everything ran from DB Pro as it is when ran from DB Classic.

..What am I missing or misunderstanding here?

Don't get me wrong, I DO like DB Professional more then DB Classic as it obviously has more powerful commands and all and I like the UI much better too.

Oh and before someone tells me that DB Pro can't make my computer faster, I am running both versions of my code on a 2 year old $1,500 gaming rig complete with an Nvidia 470 graphics card, quad core CPU etc. My computer is not what's limiting the DB Pro version from screaming, lol.


Thanks


- Zaxx
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 8th Aug 2012 06:31
If the frame rate is 60 (or possibly 120?) this could be limited by vsync, which synchronizes your monitor's refresh rate with the program's.

I've never had a program where this was an issue, so I've never looked in to what causes it, and if I remember correctly it can be a pain to solve. There should be lots of threads about it.

If not, I'm still suspicious that you say "exact". Surely there would be a large difference depending on how many objects are on the screen, random system processes, game logic, etc.

Aaron Miller
20
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 8th Aug 2012 07:39
Quote: "I've never had a program where this was an issue, so I've never looked in to what causes it, and if I remember correctly it can be a pain to solve. There should be lots of threads about it."

Vertical synchronization helps prevent tearing. Turn vsync off to test frame rate. Turn it on to prevent tearing. It's not a problem.

Cheers,
Aaron

Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 8th Aug 2012 08:02 Edited at: 8th Aug 2012 08:05
Quote: "
Okay, I understood that a program written in DB Pro was supposed to be complied to run in assembly language so that it runs much faster then one written in DB Classic.
"


It should, but there's really no absolute guarantee the end result will actually run faster. Since execution speed is dependent upon many factors. Not just core operations, but the speed and dependency of the functions we're using.


Quote: "
I'm sure I am confused or or missing something.. but I have taken my simple snake game written and ran it both on DB Classic and DB Pro since every command in my program is compatible with both.
"


Sounds like the program might be pretty simple, not making it a great benchmarking candidate. As the DB classic VM, can probably able to execute the program logic near, or on par with the machine code version from Dbpro. Now providing that Vsync is enabled, then as long as DBC can execute the logic and rendering process inside the monitors vertical refresh, you'll get the same frames per second rating in both.

The thing is, this doesn't necessarily mean they're doing the work in the same time. To keep a solid 60fps, then our program must complete it's work within the (1000/60)=16.67 (ish) milliseconds per refresh. The DB classic version of the code might be executing in say 8 milliseconds, where in Dbpro it's say 7 or less. But if vsync in enabled, then the sync operation will force a wait until the next vertical blank (wait top of frame). So the program ends up tied to the video refresh.

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 9th Aug 2012 11:25
In my experience, DBP is a way faster at, of course, rendering objects. Other things may be same, like math.

Login to post a reply

Server time is: 2026-07-07 18:20:58
Your offset time is: 2026-07-07 18:20:58