DarkBasic Pro is similar to JavaScript in this respect, because it is an interpretive language ... which means it is converted to machine code during use rather than precompiled as such.
This does slow thing alot - also using larger than 32bit strings and variable will also cause speed problems, because darkbasic doesn't understand to chop them up efficiently - or set them to a specific type (e.g a 64bit interger or such)
this means that speed is cut again... unfortunatly you either live with it or goto DarkBasic Pro.
However there is another alternative - you ever noticed the "SYNC" command - use this when you need to update the loop, and it will make sure everything is upto date and syncronised.
for Ai and such that isn't required as you need that to act as quick as possible - however on the other hand when using a timer to update the frames, you will use a sync command then.
as pure code is faster than the rendered code, you can get considerable speed increased by rendering and updating object/media sync every 2/3 frames (e.g. frame skip)
eleviates alot of pressure on the program
Anata aru kowagaru no watashi! 