Qbasicnews.com

Full Version: QBX faster than FB?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I believe a more accurate test then can be performed by compiling in GUI mode and popping up a MessageBox with the result once the test is finished. Big Grin
Here we go then:

Code:
'compile using: fbc -s gui speed.bas

'$include: "win\user32.bi"
aaa = TIMER

'test: 0.277 to -8.895 seconds
'-------------------------------------
FOR bbb=1 TO 100000: ccc=bbb: NEXT
'-------------------------------------
MessageBox NULL, "Loop: "+chr$(9)   + str$(ccc)         + _
           " cycles."    + chr$(13) + chr$(10)          + _
           "Duration: "  +chr$(9)   + str$(TIMER - aaa) + _
           " sec.", "Result", MB_OK+MB_ICONASTERISK

END
Pages: 1 2