Posts: 23
Threads: 8
Joined: Feb 2004
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
Posts: 1,272
Threads: 36
Joined: Feb 2003
Interesting.
Did you compile with or without BRUN45?
Posts: 23
Threads: 8
Joined: Feb 2004
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
Posts: 273
Threads: 51
Joined: May 2002
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. :???:
Posts: 3,279
Threads: 170
Joined: Nov 2003
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.
I'd knock on wood, but my desk is particle board.
Posts: 3,522
Threads: 189
Joined: Dec 2003
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)
Posts: 273
Threads: 51
Joined: May 2002
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.
Posts: 3,616
Threads: 287
Joined: Jan 2003
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.
Posts: 2,765
Threads: 138
Joined: Nov 2002
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
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Posts: 1,057
Threads: 156
Joined: Aug 2003
complied should be faster, Qb is interpetive