Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is an .exe slower than a .bas file?
#1
I timed the execution of my program in QB, ie in .bas format. And then I made an .exe file and it seems 20% slower. Is this normal? and is there any way to speed it up, ie thru optimization?

Thanks
Reply
#2
Interesting.
Did you compile with or without BRUN45?
Reply
#3
Sorry, I am pretty new with QB or programming for that matter. I do see BRUN45.EXE and BRUN45.LIB in my QB directory. So I don't know if I did or didn't.

Thanks
Reply
#4
When you compile, you will be asked if you want to compile so your program needs brun45 to run, or instead, you can select to create a standard EXE. But I'm not sure what the brun45 is for. I think it speeds up your program. I never used it before because whenever I used it, my program asks me for a run-time module path. :???:
Reply
#5
When you compile standalone, BRUN45.LIB is linked into your executable, making it so you don't need BRUN45.EXE. Otherwise, BRUN45.EXE is needed to execute the compiled program. This is a bad analogy and I'm sure some jackass will pick it apart, but it's similar to how VB6 programs require MSVBVM60.DLL.

I don't think there's going to be a speed difference though. I think ye just buggered something up. Big Grin
I'd knock on wood, but my desk is particle board.
Reply
#6
The exe should always be faster than the interpreted .bas file...

I have never seen anything indicating oterwise...

Could you post some code?

Have you tried timing it more than once? Sometimes windows executes the exe very slow the first time, esp if it access files o the hd (I have no idea why, but in Novix my entire computer sometimes freeze when starting up Novix ie: reading and writing a lot of files)
Reply
#7
adosorken wrote:
Quote:When you compile standalone, BRUN45.LIB is linked into your executable, making it so you don't need BRUN45.EXE. Otherwise, BRUN45.EXE is needed to execute the compiled program.

But what's the point of linking brun45.lib to the code. What does the library do? But I think when you compile so your prog requires brun45, it makes your exes smaller, since the lib wasn't included.
Reply
#8
Well, the level editor for Operation Pong runs about a third slower compiled than the interpreted version. I've tested it using the BRUN45 module, and also as a stande-alone. Don't ask me why, but it happens to me too.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#9
when i test it stand alone it's faster
with the brun45 thingy it's the same as the interpreter

Code:
t = TIMER
DO
a = a + 1
LOOP UNTIL a = 100000
PRINT TIMER - t
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#10
complied should be faster, Qb is interpetive
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)